Telecom Unicom dual-line IP Access service configuration

Source: Internet
Author: User

Nonsense don't say more, directly look at the configuration, I believe a bit of Linux based on all understand.

Unicom Network card:

[Email protected] ~]# CAT/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ENS4

Type=ethernet

Bootproto=static

Defroute=yes

Peerdns=yes

Peerroutes=yes

Ipv4_failure_fatal=no

Ipv6init=yes

Ipv6_autoconf=yes

Ipv6_defroute=yes

Ipv6_peerdns=yes

Ipv6_peerroutes=yes

Ipv6_failure_fatal=no

Name=ens4

Device=ens4

Onboot=yes

ipaddr=x.x.x.x # # #联通IP地址

netmask=x.x.x.x # # #联通掩码

gateway=x.x.x.x # # #联通网关


Telecom Network card:

[Email protected] ~]# CAT/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ENS5

Type=ethernet

Bootproto=static

Defroute=yes

Peerdns=yes

Peerroutes=yes

Ipv4_failure_fatal=no

Ipv6init=yes

Ipv6_autoconf=yes

Ipv6_defroute=yes

Ipv6_peerdns=yes

Ipv6_peerroutes=yes

Ipv6_failure_fatal=no

Name=ens5

Device=ens5

Onboot=yes

ipaddr=x.x.x.x # #电信ip

netmask=x.x.x.x # # #电信掩码

dns1=114.114.114.114

# # #注意不要配置网关, configured to not be able to surf the internet

Add in/etc/iproute2/rt_tables:

252 Tel

251 CNC

Below my:/etc/iproute2/rt_tables

#

# Reserved values

#

255Local

254Main

253Default

252 Tel

251 CNC

0Unspec

#

# Local

#

#1Inr.ruhep


Execute script:


IP route replace default via Telecom Gateway Dev ENS5

IP Route Flush Table Tel

IP route add default via telecom Gateway Dev ens5 src Telco IP Table Tel

IP rule add from Telco IP table Tel

IP route flush Table CNC

IP route add default via unicom Gateway dev ens4 src unicom ip table cnc

IP rule add from unicom IP table CNC


Double line completion (some machines need to be restarted)


Note: The first script should specify that there is no gateway to configure the network card, such as I do not configure the gateway, then the telecommunications traffic does not know so go, you can go to the default gateway, so you can pass, Unicom has a gateway naturally can pass


This article is from the "Nginx Installation Optimization" blog, please be sure to keep this source http://mrdeng.blog.51cto.com/3736360/1868016

Telecom Unicom dual-line IP Access service configuration

Related Article

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.