共計(jì) 1994 個(gè)字符,預(yù)計(jì)需要花費(fèi) 5 分鐘才能閱讀完成。
這篇文章主要介紹了 Solaris8 雙網(wǎng)卡如何配置,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓丸趣 TV 小編帶著大家一起了解一下。
一、 系統(tǒng)環(huán)境:
1、 應(yīng)用目的說明:
現(xiàn)在所有的應(yīng)用都是 192 網(wǎng)段的服務(wù)器,現(xiàn)在配置 sun 服務(wù)器雙網(wǎng)卡的目的是通過 sun 服務(wù)器,192 網(wǎng)段的所有服務(wù)器通過 sun 服務(wù)器訪問 172.172.172.170.
設(shè)置目的:192.192.192.3 和 192.192.192.151 都可以 ping 通 172.16.128.170
2、 系統(tǒng)網(wǎng)絡(luò)配置:
系統(tǒng)現(xiàn)在有兩塊網(wǎng)卡:分別是 hme0 和 eri0,打算 hme0 配 192 網(wǎng)段,eri0 配置 172 網(wǎng)段。
網(wǎng)卡配置:
bash-2.03# ifconfig -a
lo0: flags=19200849 UP,LOOPBACK,RUNNING,MULTICAST,IPv4 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000
eri0: flags=19200843 UP,BROADCAST,RUNNING,MULTICAST,IPv4 mtu 1500 index 2 inet 172.172.172.33 netmask
ffffff00 broadcast 172.16.255.255 ether 0:3:ba:29:cf:3a
hme0: lags=19200843 UP,BROADCAST,RUNNING,MULTICAST,IPv4 mtu 1500 index 3 inet 192.192.192..2 netmask ffffff00 broadcast 192.192.192..255 ether 0:3:ba:29:cf:3a
bash-2.03#
3、 系統(tǒng)路由表配置:
路由配置:
bash-2.03# netstat -nr
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
——————– ——————– —– —– —— ———
192.192.192..0 192.192.192..2 U 1 19 hme0
172.172.172.0 172.172.172.33 U 1 192 eri0
172.172.172.0 192.192.192..2 UG 1 0
224.0.0.0 192.192.192..2 U 1 0 hme0
default 192.192.192..1 UG 1 16
127.0.0.1 127.0.0.1 UH 2 5382 lo0
bash-2.03#
說明:
默認(rèn)路由:192.192.192..1(互聯(lián)網(wǎng)線路路由)
172.172.172.33(外聯(lián) 172 網(wǎng)段路由)
4、 Solaris 網(wǎng)絡(luò)更改:
保證網(wǎng)絡(luò)轉(zhuǎn)發(fā)打開默認(rèn)是關(guān)閉的:
#ndd -set /dev/ip ip_forwarding 1
#ndd -set /dev/ip ip_forward_directed_broadcasts 1
#ndd -set /dev/ip ip_forward_src_routed 1
5、 Windows 客戶端 192.192.192..151 測(cè)試:
Windows 系統(tǒng)需要添加靜態(tài)路由:
route add 172.172.172.0 mask 255.255.255.0 192.192.192..2
6、 從 Windows 客戶端 192.192.192..151 測(cè)試:
C:\Documents and Settings\guyhu ping 192.192.192..2
Reply from 192.192.192..2: bytes=32 time 1ms TTL=255
C:\Documents and Settings\guyhu ping 172.172.172.33
Reply from 172.172.172.33: bytes=32 time 1ms TTL=255
C:\Documents and Settings\guyhu ping 172.172.172.170
Reply from 172.172.172.170: bytes=32 time=5ms TTL=254
C:\Documents and Settings\guyhu
7、 總結(jié):
配置過程中一定要添加“#ndd -set /dev/ip ip_forwarding 1“,這個(gè)很重要。
感謝你能夠認(rèn)真閱讀完這篇文章,希望丸趣 TV 小編分享的“Solaris8 雙網(wǎng)卡如何配置”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持丸趣 TV,關(guān)注丸趣 TV 行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來學(xué)習(xí)!