How to configure the specified IP under multi-network card to take a router (for external networks, but staple server communication)

# How to configure a specific IP to take a router under multiple network cards (applicable to the situation where the external network is not connected, but the Dingding server is connected)

## How to view the network connection established by a process, Method One

– View process pid `ps -ef|grep dingtalk`
– View process connection `lsof -p pid -nP|grep TCP`
“`
$ lsof -p 9542,9583,9587,9531 -nP |grep TCP
dingtalk 9531 lixu 110u sock 0,9 0t0 282904864 protocol: TCP
dingtalk 9531 lixu 145u 282864 IPv4 20338543 119 215.179:443 (ESTABLISHED)
dingtalk 9531 lixu 151u sock 0,9 0t0 282904865 protocol: TCP
“`

## How to check the network connection established by a process, method two
-View process connection `netstat -antlp|grep dingtalk`
“`
$ netstat -antlp|grep dingtalk
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 32 32 0 192.168.43.110:44560 106.11.208.166:443 CLOSE_WAIT 9531/dingtalk 9531/dingtalk CLOSE_WAIT 9531/dingtalk 106: 166.562 11: 166.562 106: 208. 443 CLOSE_WAIT 9531/dingtalk
tcp 0 0 192.168.43.110:38536 203.119.215.179:443 ESTABLISHED 9531/dingtalk
“`

## DingTalk’s server address

tcp 0 90 192.168.60.26: 60006 203.119.215.179:443 ESTABLISHED 4777/dingtalk
tcp 0 192.168.43.110:52588 203.119.215.179:443 # ESTABLISHED 4777/dingtalk # static route
Nailed to the table

br>
“`
sudo route add -host 203.119.201.180 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.206.75 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.206.251 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.207.121 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.207.122 gw 192.168.60.1 dev enp0s31f6
sudo route add- host 203.119.211.253 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.214.249 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.214.251 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 203.119.215.179 gw 192.168.60.1 dev enp0s31f6
sudo route ad d -host 203.119.216.175 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 111.6.226.253 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 111.7.187.240 gw 192.168.60.1 dev enp0s31f6
sudo route add -host 111.7.187.241 gw 192.168.60.1 dev enp0s31f6
“`

## Delete route

“`
sudo route del -host 203.119.201.180< br>sudo route del -host 203.119.206.75
sudo route del -host 203.119.206.251
sudo route del -host 203.119.207.121
sudo route del -host 203.119.207.122
sudo route del- host 203.119.211.253
sudo route del -host 203.119.214.249
sudo route del -host 203.119.214.251
sudo route del -host 203.119.215.179
sudo route del -host 203.119.216.175
sudo route del -host 111.6.226.253
sudo route del -host 111.7.187.240
sudo route del -host 111.7.187.241
“`

## Information< br>
– [Configure Linux to implement static routing](https://www.cnblogs.com/ssgeek/p/9220690.html)
– [Linux route specifies static routing configuration](https://blog .51cto.com/13447608/2088853)

Options andParameters:

< tr>

Options

Explain English

< p style="text-align: center;">Interpret Chinese

< p>-A

-c

operate on the kernel’s routing cache.

Print will be LinuxCore routing cache

-n

Do not perform DNSreverse lookup, and directly display the digital IPAddress

-e

Display routing table in netstat format

-net

the target is a network

to a network Routing table

-host

the target is a host.

Routing table to a host

Parameter

Explain English

Explain Chinese

add

add a new route.

Add the specified routing record

del

del ete a route.

delete the designation Routing record

Target

parent network or destination host

gw

Set the gateway, it must be reachable

dev

The network interface represented by the routing record

reject

Closed routing

< /p>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1338 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.