Suppose you have a router with interfaces eth0 and eth1 You

Suppose you have a router with interfaces eth0 and eth1. You wish to connect eth0 to the network 10.2.4.128/26 and eth1 to the network 10.2.4.64/26. Furthermore, there is another router 10.2.4.96 on one of these networks (which one?). You want to use this router as your default route. Write a sequence of Linux \"ip route\" commands to construct the appropriate routing table. If your host generates an IP packet with a destination IP address of 10.2.4.100, determine where this packet sent to according to your routing table How about for destination 10.2.4.192?

Solution

1)
ip route add 10.2.4.128/26 dev eth0
ip route add 10.2.4.64/26 dev eth1

   route add default gw 10.2.4.96 eth1
2)

Address: 10.2.4.128 00001010.00000010.00000100.10 000000
Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000
Wildcard: 0.0.0.63 00000000.00000000.00000000.00 111111
=>
Network: 10.2.4.128/26 00001010.00000010.00000100.10 000000 (Class A)
Broadcast: 10.2.4.191 00001010.00000010.00000100.10 111111
HostMin: 10.2.4.129 00001010.00000010.00000100.10 000001
HostMax: 10.2.4.190 00001010.00000010.00000100.10 111110
Hosts/Net: 62


Address: 10.2.4.64 00001010.00000010.00000100.01 000000
Netmask: 255.255.255.192 = 26 11111111.11111111.11111111.11 000000
Wildcard: 0.0.0.63 00000000.00000000.00000000.00 111111
=>
Network: 10.2.4.64/26 00001010.00000010.00000100.01 000000 (Class A)
Broadcast: 10.2.4.127 00001010.00000010.00000100.01 111111
HostMin: 10.2.4.65 00001010.00000010.00000100.01 000001 (Min IP a Host can be assigned in subnet)
HostMax: 10.2.4.126 00001010.00000010.00000100.01 111110 (MAx IP a host can be assigned in subnet)
Hosts/Net: 62

Now you might have understood why i have declared eth1 as default route in the above answer. It falls under the ategory of 65-126 which is eth1.

Now if you ping the IP 10.2.4.100 it will be sent to eth1 interface (as it is the default route).

c) IF you ping 10.2.4.192 , the ping command will ask you to enter \"-b\" argument in its command. Because you are trying to ping the broadcast IP address for this subnet.

 Suppose you have a router with interfaces eth0 and eth1. You wish to connect eth0 to the network 10.2.4.128/26 and eth1 to the network 10.2.4.64/26. Furthermor

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site