iT邦幫忙

0

關於網路的規劃

  • 分享至 

  • xImage

A網段192.168.1.1(伺服器)
B網段192.168.2.1(Client)
我想透過一台L3的Switch將兩個網段連結
Client必需要能存取伺服器上的資料
請問我是否要在Client上架一台DNS解析伺服器上的電腦名稱?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
18
admitlove2
iT邦新手 5 級 ‧ 2014-02-16 11:14:59
最佳解答

為了讓不同的vlan封包可以互通,我們需要再Switch上設定一個Trunk Port作為溝通的管道,並且用這個Port來連接Router,讓Router來幫我們作封包的轉送。若不屬於同一網斷,就會把封包傳送給Gateway,進行Routing。

所以首先你必須先指定一個port是連結至router,並將其設定為trunk mode
Switch0>en
Switch0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch0(config)#int gi 1/1
Switch0(config-if)#switchport mode trunk

在router中要讓一個介面來連結二個vlan,就必須在一個介面下設定二個子界面。
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fastEthernet 0/0
Router(config-if)#no sh

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#int fastethernet 0/0.10
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up

Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.1.254 255.255.255.0

設定第二子界面
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fastethernet 0/0.20
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state to up
encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.2.254 255.255.255.0

測試一下
PC>ipconfig /all

FastEthernet0 Connection:(default port)
Physical Address................: 0000.0CA6.4508
Link-local IPv6 Address.........: ::
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254
DNS Servers.....................: 0.0.0.0
DHCP Servers....................: 0.0.0.0

PC>ping 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.2.1: bytes=32 time=0ms TTL=127
Reply from 192.168.2.1: bytes=32 time=0ms TTL=127
Reply from 192.168.2.1: bytes=32 time=0ms TTL=127

Ping statistics for 192.168.2.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

如此就達成您想要的部分

ctipde iT邦高手 1 級 ‧ 2014-02-18 16:45:53 檢舉

忙

16
jazozazo
iT邦高手 1 級 ‧ 2014-02-15 19:38:52

兩個不同網段要溝通是路由器的問題
和DNS沒有關聯
L3的switch上有設定好路由即可
DNS服務器看情況而定

14
pan21
iT邦新手 3 級 ‧ 2014-02-16 11:18:36

A網段192.168.1.1(伺服器)
B網段192.168.2.1(Client)
『請問我是否要在Client上架一台DNS解析伺服器上的電腦名稱?』
上面這個問題是Client要使用IP位址去存取伺服器或是用FQDN(Fully Qualified Domain Name)去存取伺服器?這兩種方式是不一樣的,前者連DNS都不用架,只要L3 Switch Routing table設定好就可以了,後者則是須架DNS而且要設定A record,這樣才解析的到伺服器,也有其他做法可以解析的到伺服器電腦名稱,只是比較費時費工,在這裡就不做說明了。
空

13
macliu
iT邦研究生 5 級 ‧ 2014-02-16 12:04:07

因為你的已經是Layer 3交換器了
所以只要設定好Vlan interface ip(對Server & pc來說就是Gateway ip)
然後啟用ip routing基本上雙邊電腦就可以互ping的到

如果你要加快網路芳齡的收斂時間(就是開機後可以最短時間看到網路上其他電腦)
透過以下作法
1.在 Server farm中規劃一台dhcp
2.在Layer 3交換器上設定(DHCP Relay 到這台dhcp)
3.server也要啟用wins服務
4.dhcp option中要記得設定wins的ip

這樣當電腦開機上網,網芳收斂也會完成
否則跨vlan的電腦會根本彼此看不到(但能直接輸入\\ip)

================================
馬克資訊科技有限公司(M.I.T.C.)
系統工程師
Mac Liu(劉淵精)
[MCSE/MCDBA/CCNA/TCSE/RHCSA/RHCE]
macliu@mac-tech.idv.tw
Http://www.mac-it.com.tw
TEL:02-87928846
FAX:02-87928845
Mobile:0927-300404
MSN&FB:macliu_tw@hotmail.com

公司資格:丙種電器承裝業、丙種電信工程業
人員資格:丙級用電設備檢驗技術士(166-007098)、丙級網路架設技術士(172-000664)、丙級電腦硬體裝修技術士(120-117438)、乙級電腦硬體裝修技術士(120-007804)、丙級視聽電子技術士(029-018052)、丙級工業電子技術士(028-131687)
訓練資格:勞工安全衛生管理員結訓、佈線系統測試工程師結訓
特殊資格:甲種勞工安全衛生業務主管、初級救護技術員、基本救命術指導員、繩索作業技術人員、中華山岳協會C級運動攀登教練
保險資格:人身壽險業務員、產物保險業務員

我要發表回答

立即登入回答