當前位置:才華齋>IT認證>H3C認證>

H3C交換機配置埠IP sub例項

H3C認證 閱讀(9.43K)

為了方便將某些埠的配置與指定埠保持一致,可以使用copy configuration 命令將指定埠的配置拷貝到其他埠。那麼H3C交換機怎麼配置埠IP sub?埠命令是什麼呢?下面跟yjbys小編一起來看看吧!

H3C交換機配置埠IP sub例項

  H3C介面獲取IP地址有以下方式:

1,通過手工指定

2,通過BOOTP分配得到IP地址

3,通過DHCP分配得到IP地址

一個介面只能有一個主IP地址,新配置的主IP地址將覆蓋原來的主IP

當介面被配置為通過BOOTP和DHCP獲取IP後,該介面不能在分配從IP地址

  舉例,同一VLAN中有個兩個IP段,和

sys

[switch]interface vlan-interface 1

[switch-vlan-interface1]ip address

[switch-vlan-interface1]ip address sub

  延伸閱讀:H3C交換機簡單配置案例

這裡使用的H3C交換機是H126A,僅僅只做了最基本的.配置以滿足使用。

配置中可以通過display current-configura命令來顯示當前使用的配置內容。

  # 配置VLAN 1

system-view

System View:return to User View with Ctrl+Z.

[Sysname]vlan 1

[Sysname-vlan1]quit

[Sysname]management-vlan1

[Sysname]interfaceVlan-interface 1

[Sysname-Vlan-interface1]ip address

  # 顯示VLAN 介面1 的相關資訊。

display ip interface Vlan-interface 1

  # 建立VLAN(H3C不支援cisco的VTP,所以只能新增靜態VLAN)

system-view

System View:return to User View with Ctrl+Z.

[H3C_TEST]vlan 99

[H3C_TEST-vlan99]nameseicoffice

[H3C_TEST-vlan99]quit

  # 把交換機的端埠劃分到相應的Vlan中

[H3C_TEST]interfaceethernet1/0/2//進入埠模式

[H3C_TEST-Ethernet1/0/2]portlink-type access //設定埠的型別為access

[H3C_TEST-Ethernet1/0/2]portaccess vlan 99//把當前埠劃到vlan 99

[H3C_TEST]vlan 99

[H3C_TEST-vlan99]portethernet1/0/1 to ethernet1/0/24//把以及網埠1/0/1到1/0/24劃到vlan99

[H3C_TEST-vlan99]quit

[H3C_TEST-GigabitEthernet1/2/1]porttrunk permit vlan 1 99 // {ID|All} 設定trunk埠允許通過的VLAN

------------------------------------

  # 配置本地使用者

system-view

System View:return to User View with Ctrl+Z.

[Sysname]local-userh3c

New local useradded.

[Sysname-luser-h3c]service-typetelnet level 3

[Sysname-luser-h3c]passwordsimple h3c

  # 配置歡迎資訊

[H3C_TEST]headerlogin %Welcome to login h3c!%

# 配置使用者認證方式telnet(vty 0-4)

[H3C_TEST]user-interfacevty 0 4

[H3C_TEST-ui-vty0-4]authentication-modescheme

[H3C_TEST-ui-vty0-4]protocolinbound telnet

[H3C_TEST-ui-vty0-4]superauthentication-mode super-password

[H3C_TEST-ui-vty0-4]quit

[H3C_TEST]superpassword level 3 simple h3c //使用者登陸後提升許可權的密碼

  # 配置Radius策略

[H3C_TEST]radiusscheme radius1

New Radius scheme

[H3C_TEST-radius-radius1]primaryauthentication 1645

[H3C_TEST-radius-radius1]primaryaccounting 1646

[H3C_TEST-radius-radius1]secondaryauthentication 1645

[H3C_TEST-radius-radius1]secondaryaccounting 1646

[H3C_TEST-radius-radius1]timer5

[H3C_TEST-radius-radius1]keyauthentication h3c

[H3C_TEST-radius-radius1]keyaccounting h3c

[H3C_TEST-radius-radius1]server-typeextended

[H3C_TEST-radius-radius1]user-name-formatwithout-domain

  # 配置域

[H3C_TEST]domainh3c

[H3C_TEST-isp-h3c]authenticationradius-scheme radius1 local

[H3C_TEST-isp-h3c]schemeradius-scheme radius1 local

[H3C_TEST]domaindefault enable h3c

  # 配置在遠端認證失敗時,本地認證的key

[H3C_TEST]local-servernas-ip key h3c