Working on the need to set up a telecom Netcom dual-line IP address under Linux, operating system for SUSE Linux Enterprise Linux one-SP2, briefly record the next steps:
Edit /etc/sysconfig/network/ifcfg-eth0, /etc/sysconfig/network/ifcfg-eth1, set the IP address of two NICs, eth0 for telecommunications, Eth1 for the Netcom
bootproto= ' static ' broadcast= ' ethtool_options= ' ipaddr= ' ${telecomip}/${telecomnetmask} ' mtu= ' NAME= ' Ethernet Card 0 ' netmask= ' network= ' remote_ipaddr= ' startmode= ' auto ' usercontrol= ' no '
2. Add two named route tables in the routing table configuration file
echo "252 tel251 cnc" >>/etc/iproute2/rt_tables
3. Write a script and set the boot from start
#!/bin/bash/sbin/ip Route Flush Table TEL/SBIN/IP route add default via ${TELECOMGW} dev eth0 src ${telecomip} table tel/s BIN/IP rule add from ${TELECOMIP} table TEL/SBIN/IP route flush Table CNC/SBIN/IP route add default via ${CNCGW} dev eth2 src ${cncip} table cnc/sbin/ip rule add from ${cncip} table CNC