Huawei-R&S-網絡工程師實驗筆記20190615-IP基礎(AR201上配置IP)


》Huawei-R&S-網絡工程師實驗筆記20190615-IP基礎(AR201上配置IP)

》》實驗開始,先上拓撲圖參考:

》》》一般正常配置IP操作如下,問題在於無法繼續:

[AR1]int e0/0/0
[AR1-Ethernet0/0/0]ip address 192.168.1.1 24
                      ^
Error: Unrecognized command found at '^' position.
[AR1-Ethernet0/0/0]

》》》》這是怎么回事呢?原來eNSP上對AR201這款路由器只設定了Ethernet接口,而且本來eNSP就對Ethernet接口定義了二層接口功能,故而無法配置IP。解決辦法也是有的,兩種方案可以成功:
1、在eNSP中直接換個型號,除了AR201其他型號都有GE口,都可以配置IP地址。
2、堅持AR201的話,可采用vlan方案,該方案又有兩種模式,具體如下:

[AR1]vlan 10
[AR1-vlan10]int vlan 10       //務必進入vlanif配置
[AR1-Vlanif10]ip address 1.1.1.1 255.255.255.0       
[AR1-Vlanif10]quit 
[AR1]
[AR1]interface Ethernet0/0/0                  //先試試Access方案

[Huawei-Ethernet0/0/0]port ?
  default    Specify current port's PVID VLAN characteristics
  link-type  Switch port link type
  priority   Specify current port's priority

[AR1-Ethernet0/0/0]port link-type access        //配置為Access模式
[AR1-Ethernet0/0/0]port default vlan 10       //Access下可以通過vlan10

[AR1]dis ip int bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/8                     unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Vlanif10                          192.168.1.1/24       up         up      //IP配置成功了   
[AR1]
[AR1]int e0/0/0     //其實,不管是Access還是Trunk都是為了E0/0/0接口可以連通其他設備,純粹配置IP是沒有意義的。現在我們開始Trunk方案。

[AR1-Ethernet0/0/0]port link-type trunk    //前面不是設置成Access了嘛,想直接改是不行的
Error: Please renew the default configurations.

[AR1-Ethernet0/0/0]undo port default vlan       //得先取消vlan配置(如果在trunk前提下改Access,怎么改?命令是什么?)
Jun 16 2019 00:16:21-08:00 AR1 %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif10 has
 turned into DOWN state. 

[AR1-Ethernet0/0/0]port link-type trunk     //現在設置trunk就沒問題了
[AR1-Ethernet0/0/0]port ?
  link-type  Switch port link type
  priority   Specify current port's priority
  trunk      Trunk port
[AR1-Ethernet0/0/0]port trunk ?       //這兩種都試一下,先試試PVID
  allow-pass  Allowed vlan
  pvid        Specify current port's PVID VLAN characteristics

[AR1-Ethernet0/0/0]port trunk pvid vlan 10
[AR1-Ethernet0/0/0]dis ip int bri    
[AR1-Ethernet0/0/0]q
[AR1]q
<AR1>ping 192.168.1.2
  PING 192.168.1.2: 56  data bytes, press CTRL_C to break
    Request time out
  --- 192.168.1.2 ping statistics ---
    5 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss       //PVID不通,再試試allow-pass

[AR1]int e0/0/0
[AR1-Ethernet0/0/0]port trunk allow-pass vlan 10
Jun 16 2019 00:22:39-08:00 AR1 %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif10 has
 turned into UP state. 
[AR1-Ethernet0/0/0]q
[AR1]dis ip int bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/8                     unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Vlanif10                          192.168.1.1/24       up         up        
[AR1]q

<AR1>ping 192.168.1.2
  PING 192.168.1.2: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=320 ms
    Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 192.168.1.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/78/320 ms                       //這時候就能ping通了
<AR1>

 

 

 

 

未完待續。。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM