Emulating multiple machines in few realtime machines

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 I am new to configuring routing tables and this may be a naive question,
but please help me out in this.

My requirement is to emulate many machines/network with 2 or 3 real
machines.

Consider the case

       Dummy Network
       -------------

 10.107.35.220 <-----10.107.35.221<----10.107.35.222
     (R1)   |             (R2)           ^   (R3)
            |                            |
            +----------------------------+
                    -->

 Now, I have to configure this in two real time(say 35.1, 35.2) machines
They are connected as below

           (A)                    (B)      --> Real Machine symbols
	10.107.35.1 <--------> 10.107.35.2
        (R1,R3)                (R2)        --> dummy routers symbols

I followed the procedure as below

In  10.107.35.1 (Real Machine A)

	 Ifconfig
	 ---------
	eth0   :- 10.107.35.1
	eth0:1 :- 10.107.35.220 (dummy ip)  (say R1)
	eth0:2 :- 10.107.35.222 (dummy ip)  (say R3)
	ip rule
	-------
	ip rule add from R3 dev any table 'mytable'

	For creation of my  'mytable' I used the following
	--------------------------------------------------
	ip route add  R1  via R2  dev eth0 table 'mytable' src R3


Ifconfig in 10.107.35.2 (Real Machine B)
-----------------------
eth0   :- 10.107.35.2
eth0:1 :- 10.107.35.221 (dummy ip) (say R2)


Now I am testing using the command
----------------------------------

ping R1 -I R3
  (Here -I option indicates sending packets with source Ip R3)


But no ping message reaching the other machine (Real Mahine B).
Ping reply coming due to local routing. (Seems it is not looking up
the new table 'mytable' I created)

Checking with ethereal in 'B' does not show any ICMP packet from R3
Checking with ethereal in 'A' shows the routing to be local routing.

What is the wrong in my procedure. If the above procedure is wrong
Please suggest some procedure to build a network in
2-3 machines.


Please some one help me out in this.




--------------------
The programmer's national anthem is 'AAAAAAAAHHHHHHHH'.  -Weinberg, p.152


_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux