hey guys, I am using Netkit to simulate a network, I am using the static routing lab provided by Netkit and I am trying to set up 3 routers. I have 3 routers each with a pc connected.
pc1 on r1 can ping pc2 on r2 and vice versa.
pc3 on r3 can pnig pc2 on r2 and vice versa.
but pc1 cant ping pc3 on r3.
This is my problem I can't seem to get a connection between pc1 on router 1 to connect to pc3 on router 3.
Below is how I have configured the network:
r1.startup:
ifconfig eth0 195.11.14.1 netmask 255.255.255.0 broadcast 195.11.14.255 up
ifconfig eth1 100.0.0.9 netmask 255.255.255.252 broadcast 100.0.0.11 up
route add -net 200.1.1.0 netmask 255.255.255.0 gw 100.0.0.10 dev eth1
r2.startup:
ifconfig eth0 200.1.1.1 netmask 255.255.255.0 broadcast 200.1.1.255 up
ifconfig eth1 100.0.0.10 netmask 255.255.255.252 broadcast 100.0.0.11 up
ifconfig eth2 100.1.1.10 netmask 255.255.255.252 broadcast 100.1.1.11 up
route add -net 195.11.14.0 netmask 255.255.255.0 gw 100.0.0.9 dev eth1
route add -net 195.20.14.0 netmask 255.255.255.0 gw 100.1.1.9 dev eth2
r3.startup:
ifconfig eth0 195.20.14.1 netmask 255.255.255.0 broadcast 195.20.14.255 up
ifconfig eth1 100.1.1.9 netmask 255.255.255.252 broadcast 100.1.1.11 up
route add -net 200.1.1.0 netmask 255.255.255.0 gw 100.1.1.10 dev eth1
pc1.startup
ifconfig eth0 195.11.14.5 netmask 255.255.255.0 broadcast 195.11.14.255 up
route add default gw 195.11.14.1 dev eth0
pc2.startup
ifconfig eth0 200.1.1.7 netmask 255.255.255.0 broadcast 200.1.1.255 up
route add default gw 200.1.1.1 dev eth0
pc3.startup
ifconfig eth0 195.20.14.9 netmask 255.255.255.0 broadcast 195.20.1.255 up
route add default gw 195.20.14.1 dev e开发者_JS百科th0
lab.conf:
r1[0]="A" r1[1]="B"
r2[0]="C" r2[1]="B" r2[2]="D"
r3[0]="E" r3[1]="D"
pc1[0]="A" pc2[0]="C" pc3[0]="E"
Any help would be appreciated. Thanks.
Please check the routing table of R1, It needs another route add
to the network 100.1.1.0/30
.
(BTW, my netkit tutorials (sadly in french) are here and support for wireshark between machines is here)
update: please check your routing tables: each router need to know the destination network to be able to send packets to it. For instance, how R1 can understand to which router it has to send if It don't know the destination network 195.20.14.0/24
精彩评论