【Cisco NA】单臂路由+DHCP+DHCP中继+GRE Tunnel
①配置单臂路由 ✔
②在Branch上开启DHCP,同时PC1、PC2能通过DHCP获取到IP地址,并且互相能访问 ✔
③关闭Branch上DHCP并配上DHCP中继,在server上配置DHCP,实现DHCP跨广播域服务 ✔
④在Branch和HQ之间开启GRE,实现PC1和PC2的相互访问,以及到server的访问 ✔
PC1
PC1(config)#no ip routing
PC1(config)#int e0/1
PC1(config-if)#ip address dhcp
PC1(config-if)#no sh
PC1(config-if)#
*Jan 9 10:42:41.280: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Jan 9 10:42:42.286: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
PC1(config-if)#
*Jan 9 10:42:53.504: %DHCP-6-ADDRESS_ASSIGN: Interface Ethernet0/1 assigned DHCP address 10.1.10.1, mask 255.255.255.0, hostname PC1
PC1(config-if)#do ping 10.1.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.20.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 6/7/9 ms
PC1(config-if)#
PC1>en
PC1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
PC1(config)#int e0/1
PC1(config-if)#no sh
PC1(config-if)#
*Jan 11 05:06:25.069: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Jan 11 05:06:26.075: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
PC1(config-if)#
*Jan 11 05:07:26.080: %DHCP-6-ADDRESS_ASSIGN: Interface Ethernet0/1 assigned DHCP address 10.1.10.1, mask 255.255.255.0, hostname PC1
PC1(config-if)#do ping 172.16.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/18 ms
PC1(config-if)#do ping 10.1.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/12 ms
PC1(config-if)#
PC2
PC2(config)#no ip routing
PC2(config)#int e0/1
PC2(config-if)#ip add dhc
PC2(config-if)#ip add dhcp
PC2(config-if)#no sh
PC2(config-if)#
*Jan 9 10:42:51.872: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Jan 9 10:42:52.872: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
PC2(config-if)#
*Jan 9 10:43:04.188: %DHCP-6-ADDRESS_ASSIGN: Interface Ethernet0/1 assigned DHCP address 10.1.20.1, mask 255.255.255.0, hostname PC2
PC2(config-if)#do ping 10.1.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/14 ms
PC2(config-if)#
PC2>en
PC2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
PC2(config)#int e0/1
PC2(config-if)#no sh
PC2(config-if)#
*Jan 11 05:07:54.369: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Jan 11 05:07:55.373: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
PC2(config-if)#
*Jan 11 05:07:58.518: %DHCP-6-ADDRESS_ASSIGN: Interface Ethernet0/1 assigned DHCP address 10.1.20.1, mask 255.255.255.0, hostname PC2
PC2(config-if)#end
PC2#ping
*Jan 11 05:08:04.867: %SYS-5-CONFIG_I: Configured from console by console
PC2#ping 10.1.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.10.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 5/6/8 ms
PC2#ping 172.16.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/18 ms
PC2#
SW1
SW1(config)#vlan 10,20
SW1(config-vlan)#exit
SW1(config)#int e0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#exi
SW1(config)#int range e0/2 - 3
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#exi
SW1(config)#int e0/0
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#
SW2
SW2(config)#vlan 10,20
SW2(config-vlan)#exi
SW2(config)#int e0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#exi
SW2(config)#int
SW2(config)#interface range ethernet 0/2 - 3
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#
Branch
Branch(config)#int e0/0.1
Branch(config-subif)#encapsulation dot1Q 10
Branch(config-subif)#ip add 10.1.10.254 255.255.255.0
Branch(config-subif)#exit
Branch(config)#int e0/0.2
Branch(config-subif)#encapsulation dot1Q 20
Branch(config-subif)#ip add 10.1.20.254 255.255.255.0
Branch(config-subif)#exit
Branch(config)#ip dhcp pool vlan 10
Branch(dhcp-config)#network 10.1.10.0 255.255.255.0
Branch(dhcp-config)#default-router 10.1.10.254
Branch(dhcp-config)#lease 0 0 3
Branch(dhcp-config)#exit
Branch(config)#ip dhcp pool vlan 20
Branch(dhcp-config)#network 10.1.20.0 255.255.255.0
Branch(dhcp-config)#default-router 10.1.20.254
Branch(dhcp-config)#lease 0 0 3
Branch(dhcp-config)#exit
Branch(config)#int e0/0
Branch(config-if)#no sh
---------------------------------------------------------
Branch#sh run | s dhcp
ip dhcp pool vlan 10
network 10.1.10.0 255.255.255.0
default-router 10.1.10.254
lease 0 0 3
ip dhcp pool vlan 20
network 10.1.20.0 255.255.255.0
default-router 10.1.20.254
lease 0 0 3
Branch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Branch(config)#no ip dhcp pool vlan 10
Branch(config)#no ip dhcp pool vlan 20
Branch(config)#int e0/1
Branch(config-if)#shut
Branch(config-if)#shutdown
Branch(config-if)#int s4/0
Branch(config-if)#encapsulation ppp
Branch(config-if)#ip add 12.1.1.1 255.255.255.252
Branch(config-if)#no sh
Branch(config-if)#
*Jan 11 04:46:46.292: %LINK-3-UPDOWN: Interface Serial4/0, changed state to up
Branch(config-if)#
*Jan 11 04:46:47.394: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial4/0, changed state to up
Branch(config-if)#
*Jan 11 04:47:10.065: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial4/0, changed state to down
Branch(config-if)#
*Jan 11 04:47:20.070: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial4/0, changed state to up
Branch(config-if)#exit
Branch(config)#interface tunnel 123
Branch(config-if)#
*Jan 11 04:58:23.363: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel123, changed state to down
Branch(config-if)#tunnel mode gre ip
Branch(config-if)#ip add 10.1.1.1 255.255.255.252
Branch(config-if)#no sh
Branch(config-if)#tunnel source 12.1.1.1
Branch(config-if)#tunnel destination 12.1.1.2
Branch(config-if)#
*Jan 11 05:02:27.005: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel123, changed state to up
Branch(config-if)#do sh run int tun123
Building configuration...
Current configuration : 117 bytes
!
interface Tunnel123
ip address 10.1.1.1 255.255.255.252
tunnel source 12.1.1.1
tunnel destination 12.1.1.2
end
Branch(config-if)#exi
Branch(config)#ip route 172.16.1.0 255.255.255.0 tunnel 123
Branch(config)#int e0/0.1
Branch(config-subif)#ip helper-address 172.16.1.100
Branch(config-subif)#int e0/0.2
Branch(config-subif)#ip helper-address 172.16.1.100
Branch(config-subif)#end
Branch#sh ip
*Jan 11 05:08:48.857: %SYS-5-CONFIG_I: Configured from console by console
Branch#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
C 10.1.1.0/30 is directly connected, Tunnel123
L 10.1.1.1/32 is directly connected, Tunnel123
C 10.1.10.0/24 is directly connected, Ethernet0/0.1
L 10.1.10.254/32 is directly connected, Ethernet0/0.1
C 10.1.20.0/24 is directly connected, Ethernet0/0.2
L 10.1.20.254/32 is directly connected, Ethernet0/0.2
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.1.1.0/30 is directly connected, Serial4/0
L 12.1.1.1/32 is directly connected, Serial4/0
172.16.0.0/24 is subnetted, 1 subnets
S 172.16.1.0 is directly connected, Tunnel123
HQ
HQ>en
HQ#conf t
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#int e0/1
HQ(config-if)#shutdown
HQ(config-if)#int s4/0
HQ(config-if)#encapsulation ppp
HQ(config-if)#ip add 12.1.1.2 255.255.255.252
HQ(config-if)#no sh
HQ(config-if)#
*Jan 11 04:47:17.349: %LINK-3-UPDOWN: Interface Serial4/0, changed state to up
*Jan 11 04:47:18.358: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial4/0, changed state to up
HQ(config-if)#int e0/0
HQ(config-if)#ip add 172.16.1.1 255.255.255.0
HQ(config-if)#no sh
HQ(config-if)#
*Jan 11 04:48:33.405: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Jan 11 04:48:34.410: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
HQ(config-if)#
HQ#conf t
Enter configuration commands, one per line. End with CNTL/Z.
HQ(config)#int tunnel 123
*Jan 11 05:04:25.351: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel123, changed state to down
HQ(config-if)#tunnel mode gre ip
HQ(config-if)#ip add 10.1.1.2 255.255.255.252
HQ(config-if)#no sh
HQ(config-if)#tunnel source 12.1.1.2
HQ(config-if)#tunnel destination 12.1.1.1
HQ(config-if)#
*Jan 11 05:05:21.114: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel123, changed state to up
HQ(config-if)#exit
HQ(config)#ip route 10.1.0.0 255.255.0.0 tunnel 123
HQ(config)#do sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
S 10.1.0.0/16 is directly connected, Tunnel123
C 10.1.1.0/30 is directly connected, Tunnel123
L 10.1.1.2/32 is directly connected, Tunnel123
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.1.1.0/30 is directly connected, Serial4/0
L 12.1.1.2/32 is directly connected, Serial4/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/24 is directly connected, Ethernet0/0
L 172.16.1.1/32 is directly connected, Ethernet0/0
Server
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Server
Server(config)#int e0/0
Server(config-if)#ip add 172.16.1.100 255.255.255.0
Server(config-if)#no sh
Server(config-if)#
*Jan 11 04:49:01.941: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Jan 11 04:49:02.941: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
Server(config-if)#exit
Server(config)#ip dhcp pool vlan10
Server(dhcp-config)#network 10.1.10.0 255.255.255.0
Server(dhcp-config)#default-router 10.1.10.254
Server(dhcp-config)#lease 0 12
Server(dhcp-config)#exit
Server(config)#ip dhcp pool vlan20
Server(dhcp-config)#network 10.1.20.0 255.255.255.0
Server(dhcp-config)#default-router 10.1.20.254
Server(dhcp-config)#lease 0 12
Server(dhcp-config)#exit
Server(config)#ip route 0.0.0.0 0.0.0.0 e0/0 172.16.1.1
Server(config)#end
Server#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 172.16.1.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 172.16.1.1, Ethernet0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/24 is directly connected, Ethernet0/0
L 172.16.1.100/32 is directly connected, Ethernet0/0
转载于:https://blog.51cto.com/14164997/2340822
【Cisco NA】单臂路由+DHCP+DHCP中继+GRE Tunnel相关推荐
- 思科——单臂路由与DHCP的结合
今天给大家带来一个小型网络构建实验,主要是思科设备单臂路由和DHCP的结合运用. 知识点: 一.单臂路由 &单臂路由 的定义及作用 单臂路由(router-on-a-stick)是指在路由器的 ...
- 【CyberSecurityLearning 16】单臂路由与DHCP中继+ ICMP协议+VTP
目录 一.单臂路由 单臂路由引入: 单臂路由实验演示: 单臂路由缺点: 二.ICMP协议 单臂路由练习实验:(★) 单臂路由缺点: 三.VTP(VLAN Trunking Protocol) VTP概 ...
- cisco服务器单臂路由服务器无响应,Cisco单臂路由技术
Cisco单臂路由 需求: 通过三层交换终结vlan. 思路: 1.创建VLAN 2.VLAN划分正确 3.建立子接口 4.划分子接口给VLAN 5.配置所需中继口 拓扑: 步骤: 1.在SW1.SW ...
- 第15节 单臂路由上部署DHCP服务器及DHCP中继——基于PacketTracer仿真实验
1理论知识储备 1.1 VTP协议相关理论知识 概念:VTP(VLAN Trunking Protocol):是VLAN中继协议,也被称为虚拟局域网干道协议.它是思科私有协议. 作用:在企业网络中有多 ...
- 路由器上DHCP配置 及单臂路由
dhcp服务器监听端口67 客户端使用68端口 1.全局地址池的DHCP服务器分配地址给客户端 [AR]int g0/0/0 [AR-GigabitEthernet0/0/0]ip address 1 ...
- 路由器交换机:单臂路由下的DHCP
单臂路由下的DHCP实验报告 实验拓扑: 实验要求: 让Vlan10 和Vlan20下的PC能够自动获得IP地址: 让Vlan10下的PC能够Ping通Vlan20下的PC: 实验步骤: Switch ...
- eNSP配置(直连/静态/动态路由,DHCP,单臂路由,ACL,NAT,链路聚合,负载均衡,WLAN,备份路由)
目录 常见问题: 一.同/不同网段与网关之间通信 二.以太网基本VLAN 三.静态路由 四.动态路由 (1)OSPF(开放最短优先路径) 适用于大型网络结构 (补充DR BDR) 单区域 多区域 (2 ...
- Cisco Packet Tracer(静态路由+Trunk+VTP协议+单臂路由)
文章目录 路由 静态路由配置 交换机 跨交换机vlan通信(Trunk配置) VTP协议 路由器怎么通过交换机ping通主机(单臂路由配置) 路由 静态路由配置 Router3和Router6之间的网 ...
- 华为防火墙做单臂路由_华为单臂路由配置实例
华为单臂路由实验配置(共8篇)华为 AR2200路由器单臂路由配置实例华为 AR2200路由器单臂路由配置实例作者:救世主220实验日期:2015 6 29实验拓扑如下:AR5配置:[AR5]dis ...
- 用boson做vlan的单臂路由实验
用boson做vlan的单臂路由实验 2007-11-22 09:04 这次用boson做的vlan单臂路由实验比较简单,有人说用Dynamips说比较真实,可是vlan小实验用boson做已经足够了 ...
最新文章
- SQL Server中的命名规范(个人使用)
- 《主算法》作者Pedro Domingos:做机器学习硬件不能只考虑深度学习
- Unix平台上OUI启动常见问题
- ASP.NET实现下载的中文文件名乱码处理
- String的常用方法(java)
- 百家搜索:在网站中添加Google、百度等搜索引擎
- 安装java 并配置环境变量_安装Java JDK并配置环境变量
- PingCAP联合创始人兼CTO黄东旭:致力于打造全球最好的分布式数据库
- 购物车功能完整版12.13
- 从零实现深度学习框架——逻辑回归简介
- Ubuntu下yolov4训练自己的数据集
- winrar分卷压缩_无广告的WinRAR解压软件
- 《工业设计史》第十一章:走向多元化
- 关于MAC安装yarn
- python爬取学籍信息_小学 学生学籍信息汇总及自动检查代码(Python)
- 推荐几本图灵最新移动开发图书
- Kaggle教程 机器学习中级7 Data Leakage
- HTTPS、HTTPS、SSH、MSTSC等常用网络服务的端口号
- css超出两行显示省略号
- 保存淘宝商品图片的方法
热门文章
- 西瓜书+实战+吴恩达机器学习(二二)概率图模型之马尔可夫随机场
- 花书+吴恩达深度学习(二四)蒙特卡罗方法(重要采样,MCMC)
- 睡眠排序法-objective C版的代码
- LeetCode刷题(21)
- Docker安装宝塔没想到竟然如此之简单~
- Lambda表达式的生动理解以及Java Lambda表达式常见使用场景
- Java事务管理之JDBC
- JAVA水晶花数_我的世界Java版1.17快照20w45a新增物品详解
- request.getRequestDispatcher().forward(request,response)和response.sendRedirect()的区别
- 计算机应用基础离线考核,东师2016年秋季《计算机应用基础》期末考核离线作业...