[CentOS] Building a basic router with two nic's

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



I need help setting up a basic routing between two nic's on my CentOS desktop. I thought I'd understood the basics, but ... I don,t want a nat router, just packets forwarded back and fort.

This is what I thought would do the trick, but didn't. Can someone please give me some pointers or links so I can get this right.

# echo "1" > /proc/sys/net/ipv4/ip_forward
# route add -net 192.168.2.0 netmask 255.255.255.0 eth1
# route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.150 eth1
#
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 192.168.1.150 255.255.255.0 UG 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.1.150 0.0.0.0 UG 0 0 0 eth1


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux