1. #vi/etc/iproute2/rt_tables (add Unicom, Telecom, mobile three routing tables)
#添加
Ten CNC
Tel
Cmcc
2. Need to use the Vconfig software. First Yum installs Vconfig
Yum Install Vconfig
3. #vi/etc/rc.local to set the routing table contents
#添加
Modprobe 8021q
Vconfig add eth0 60 (Unicom)
Vconfig add eth0 113 (Telecom)
Vconfig add eth0 120 (MOBILE)
Ifconfig eth0 0.0.0.0
Ifconfig eth0.60 unicom IP netmask Subnet mask up
Ifconfig eth0.113 Telco IP netmask Subnet mask up
Ifconfig eth0.120 Mobile IP netmask Subnet mask up
IP route Add the number of bits of the subnet/subnet mask that the telco IP belongs to dev eth0.113 src Telecom IP Table Tel
IP route add default via Telco Gateway table Tel
IP rule add from Telco IP table Tel
IP route Add the number of bits of subnet/subnet mask that the IP is owned by dev eth0.60 src unicom ip table cnc
IP route add default via Unicom Gateway table CNC
IP rule add from unicom IP table CNC
IP route Add the number of bits of the subnet/subnet mask that the mobile IP belongs to dev eth0.120 src Mobile IP table CMCC
IP route add default via mobile Gateway table CMCC
IP rule add from Mobile IP table CMCC
Route add default GW mobile Gateway
Why is the mobile gateway finally here? Here because the customer is a single-line access, but also a mobile IP, and then give a telecommunications IP.
Today collated out, we add, thank you!
This article is from the "Linux" blog, so be sure to keep this source http://anxia.blog.51cto.com/9179984/1605817
Three-wire computer room Linux Server single NIC with multiple Vlanip