自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux下如何實(shí)現(xiàn)不同網(wǎng)段之間的訪問

運(yùn)維 系統(tǒng)運(yùn)維
本實(shí)例要說明的是:實(shí)現(xiàn)10.0.0.0/24網(wǎng)段與192.168.2.0/24網(wǎng)段相互訪問.

本實(shí)例要說明的是:實(shí)現(xiàn)10.0.0.0/24網(wǎng)段與192.168.2.0/24網(wǎng)段相互訪問.
步驟1:查看本機(jī)IP地址
[root@localhost root]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:A7:6E:77
inet addr:10.0.0.120  Bcast:10.0.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:2418 errors:0 dropped:0 overruns:0 frame:0
TX packets:1293 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1000347 (976.9 Kb)  TX bytes:192592 (188.0 Kb)
Interrupt:10 Base address:0x2024
步驟2:添加路由規(guī)則
[root@localhost root]# route add -net 192.168.2.0/24 eth0

步驟3:查看路由規(guī)則
[root@localhost root]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     0      0        0 eth0
192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0

注:route規(guī)則中,必須同時(shí)存在兩個(gè)網(wǎng)段,否則,一個(gè)網(wǎng)段的IP地址將無(wú)法訪問到另一網(wǎng)段的IP地址。
步驟4:檢測(cè)本地機(jī)(IP:10.0.0.120)與遠(yuǎn)程機(jī)(IP:192.168.2.80)是否可互訪.
[root@localhost root]# ping 192.168.2.80
PING 192.168.2.80 (192.168.2.80) 56(84) bytes of data.
64 bytes from 192.168.2.80: icmp_seq=1 ttl=127 time=5.51 ms
64 bytes from 192.168.2.80: icmp_seq=2 ttl=127 time=3.17 ms

步驟5:刪除路由規(guī)則
[root@localhost root]# route del -net 192.168.2.0/24 eth0

 

【編輯推薦】

  1. 淺談Linux環(huán)境下如何確保系統(tǒng)安全運(yùn)行
  2. Linux 的魅力: 開發(fā) Nokia N800
  3. Linux安全設(shè)置手冊(cè)
責(zé)任編輯:張燕妮 來源: LUPA論壇
相關(guān)推薦

2019-09-22 22:11:48

寬帶路由器子網(wǎng)

2010-03-04 15:00:12

Linux不同網(wǎng)段訪問

2009-02-06 09:50:00

路由器網(wǎng)段

2009-02-24 09:30:00

IP路由網(wǎng)段互通

2009-12-14 09:26:05

配置靜態(tài)路由

2018-01-18 14:50:56

Nginx實(shí)現(xiàn)CDSW

2010-09-26 14:01:30

DHCP中繼故障

2013-09-18 09:27:57

2010-09-26 13:49:55

DHCP中繼故障

2019-08-12 09:22:56

vlanping網(wǎng)絡(luò)

2009-02-12 10:12:00

NAT配置

2010-07-06 16:08:51

HART協(xié)議

2010-06-12 14:48:22

2009-09-09 11:12:50

路由器

2013-08-21 15:04:32

2019-10-27 23:53:13

PC交換機(jī)通信

2012-09-21 09:31:48

Linux服務(wù)器Windows

2013-09-17 09:08:07

ARP欺騙IP

2009-09-09 13:47:38

C++訪問SqlCe

2017-03-16 14:07:11

LinuxSSH遠(yuǎn)程訪問
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)