|
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translation
rotary 參數(shù)是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。
overload參數(shù)用于PAT 將內(nèi)部IP映射到一個(gè)公網(wǎng)IP不同的端口上。
外部網(wǎng)關(guān)協(xié)議配置
routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP驗(yàn)證:
RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap pap}
3.PIX防火墻命令
Pix525(config)#nameif ethernet0 outside security0 ;命名接口和級(jí)別
Pix525(config)#interface ethernet0 auto ;設(shè)置接口方式
Pix525(config)#interface ethernet1 100full ;設(shè)置接口方式
Pix525(config)#interface ethernet1 100full shutdown
Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定義公網(wǎng)IP區(qū)間
Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句
Pix525(config)#global (outside) 1 133.0.0.1 ;例句
Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉設(shè)置
Pix525(config)#nat (if_name) nat_id local_ip [netmark]
Pix525(config)#nat (inside) 1 0 0
內(nèi)網(wǎng)所有主機(jī)(0代表0.0.0.0)可以訪問global 1指定的外網(wǎng)。
Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0
內(nèi)網(wǎng)172.16.5.0/16網(wǎng)段的主機(jī)可以訪問global 1指定的外網(wǎng)。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式
Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句
Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句
Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8
表示內(nèi)部ip地址192.168.0.8,訪問外部時(shí)被翻譯成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8
中間區(qū)域ip地址172.16.0.8,訪問外部時(shí)被翻譯成133.0.0.1全局地址。本新聞共 3頁,當(dāng)前在第 3頁 1 2 3 |
【收藏】【打印】【進(jìn)入論壇】 |
|
|
|
|
|
|
|