IPROUTE2 configuration Telecom Netcom (policy Routing)

Source: Internet
Author: User
<span id="Label3"> </p><pre class="brush:bash;toolbar:false">Cat net.sh #!/bin/bash#--------------------------------------------------#Author: jimmygong#email:[ email protected] #FileName:ip.sh#function:  #Version:1.0  #Created: 2015-07-17#-------------------- ------------------------------rttable= ' cat /etc/iproute2/rt_tables|egrep  "251|252" ' if [[ $ ? -eq 1 ]]then    echo  ' 252&NBSP;CNC '  >> /etc/iproute2 /rt_tables    echo  ' 251&NBSP;CTC '  >> /etc/iproute2/rt_tableselse     exit 1fictcgw=1.1.1.1cncgw=2.2.2.2ctceth=eth0cnceth=eth2ctcip= ' cat /etc/ Sysconfig/network-scripts/ifcfg-$ctceth |grep -i ^ipaddr|awk -f \=  ' {print $2} ' Cncip= ' Cat /etc/sysconfig/network-scripts/ifcfg-$cnceth |grep -i ^ipaddr|awk -f \=   ' {print $2} ' ip route flush table ctcip route add default  via  $CTCGW &NBSP;DEV&NBsp; $ctceth  src  $ctcip  table ctcip rule add from  $ctcip  table  ctcip route flush table cncip route add default via  $CNCGW  dev  $cnteth  src  $cncip  table cncip rule add from  $cncip &NBSP;TABLE&NBSP;CNC Some instructions 1, configuration instructions table 255 local (local Routing table) table 254 main (main route table)   Table 253 default (default Route Table) 2, View the contents of the routing table IP&NBSP;ROUTE&NBSP;LIST&NBSP;TABLE&NBSP;CTCDEFAULT&NBSP;VIA&NBSP;1.1.1.1&NBSP;DEV&NBSP;ETH0&NBSP;SRC  111.111.111.111ip route list table cncdefault via 2.2.2.2 dev  eth2 src 222.222.222.2223, need to install Iproute package (I.E. IP command) yum -y install iproute4, Variable description CTCGW    means Telecom Gateway  cncgw   Express netcom Gateway  ctceth  use eth0  to connect telecom extranet ipcnceth  use eth2  Network 5, IP command ipeth1    connected to Internet</pre><p><p>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/CD/wKioL1WpBN6AkuV4AAF4h4beglo963.jpg "title=" Aaa.png "alt=" wkiol1wpbn6akuv4aaf4h4beglo963.jpg "/><br></p></p><p><p>This article is from the "7928217" blog, please be sure to keep this source http://7938217.blog.51cto.com/7928217/1675792</p></p><p><p>IPROUTE2 configuration Telecom Netcom (policy Routing)</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.