49.How to configure Routers and Gateways?
Ans.
1. The router connected to each network is called its gateway.
2. IP forwarding is enabled by using following commands:
echo ”1” > /proc/sys/net/ipv4/ip_forward
3. If a system has two network interfaces, the network interfaces would be configured as shown below:
4. INTERFACE ADDRESS MASK
Eth0 192.168.1.1 255.255.255.128
Eth1 192.168.1.129 255.255.255.128
5. The network routing the system would use is as follows:
DESTINATION GATEWAY MASK INERFACE
192.168.1.0 192.168.1.1 255.255.255.128 eth0
192.168.1.128 192.168.1.129 255.255.255.128 eth1
6. To finish the changes we use following commands:
#route add –net 192.168.1.0
#route add default gw 192.168.129
Ans.
1. The router connected to each network is called its gateway.
2. IP forwarding is enabled by using following commands:
echo ”1” > /proc/sys/net/ipv4/ip_forward
3. If a system has two network interfaces, the network interfaces would be configured as shown below:
4. INTERFACE ADDRESS MASK
Eth0 192.168.1.1 255.255.255.128
Eth1 192.168.1.129 255.255.255.128
5. The network routing the system would use is as follows:
DESTINATION GATEWAY MASK INERFACE
192.168.1.0 192.168.1.1 255.255.255.128 eth0
192.168.1.128 192.168.1.129 255.255.255.128 eth1
6. To finish the changes we use following commands:
#route add –net 192.168.1.0
#route add default gw 192.168.129
Comments
Post a Comment