[实例]H&M SH office 2 IP地址段扩容

[实例]H&M SH office 2 IP地址段扩容

环境如图:

SH office 2以前使用10.200.4.0网段,现需求扩大IP 地址段.

方法1:更改mask,但这个会影响到目前所有设备的更改及地址规划等问题

方法2: 添加一个新的IP地址段给sh office 2使用

现在我们就来实现方法2

1-构建MPLS网络

SH office 2与 SH office1 通过 MPLS 连接,R6有环回口6.6.6.6

R1-R4跑的是静态路由 <模拟现状>

R6-R5 跑得是OSPF

1-1察看VRF信息

R4#sh ip vrf detail

VRF mpls14 (VRF Id = 1); default RD 1:1; default VPNID <not set>

Interfaces:

Fa0/1

VRF Table ID = 1

Export VPN route-target communities

RT:16:16

Import VPN route-target communities

RT:16:16

No import route-map

No export route-map

VRF label distribution protocol: not configured

VRF label allocation mode: per-prefix

R4#sh ip vrf interfaces

Interface IP-Address VRF Protocol

Fa0/1 14.1.1.4 mpls14 up

1-2察看VRF路由

R4#sh ip route vrf mpls14

Gateway of last resort is 14.1.1.1 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 14.1.1.1, FastEthernet0/1

6.0.0.0/32 is subnetted, 1 subnets

B 6.6.6.6 [200/2] via 5.5.5.5, 00:11:54

14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 14.1.1.0/24 is directly connected, FastEthernet0/1

L 14.1.1.4/32 is directly connected, FastEthernet0/1

56.0.0.0/24 is subnetted, 1 subnets

B 56.1.1.0 [200/0] via 5.5.5.5, 00:11:54

R5#sh ip route vrf mpls56

Gateway of last resort is 4.4.4.4 to network 0.0.0.0

B* 0.0.0.0/0 [200/0] via 4.4.4.4, 00:12:32

6.0.0.0/32 is subnetted, 1 subnets

O 6.6.6.6 [110/2] via 56.1.1.6, 00:12:48, FastEthernet0/0

56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 56.1.1.0/24 is directly connected, FastEthernet0/0

L 56.1.1.5/32 is directly connected, FastEthernet0/0

R4#sh ip protocols vrf mpls14

*** IP Routing is NSF aware ***

Routing Protocol is "bgp 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

IGP synchronization is disabled

Automatic route summarization is disabled

Redistributing: static

Maximum path: 1

Routing Information Sources:

Gateway Distance Last Update

Distance: external 20 internal 200 local 200

R5#sh ip protocols vrf mpls56

*** IP Routing is NSF aware ***

Routing Protocol is "ospf 56"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 56.1.1.5

It is an area border and autonomous system boundary router

Redistributing External Routes from,

bgp 1, includes subnets in redistribution

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

56.1.1.0 0.0.0.255 area 0

Routing Information Sources:

Gateway Distance Last Update

6.6.6.6 110 00:14:15

Distance: (default is 110)

Routing Protocol is "bgp 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

IGP synchronization is disabled

Automatic route summarization is disabled

Redistributing: ospf 56

Maximum path: 1

Routing Information Sources:

Gateway Distance Last Update

Distance: external 20 internal 200 local 200

1-3察看LFIB

R5#sh mpls forwarding-table

Local Outgoing Prefix Bytes Label Outgoing Next Hop

Label Label or Tunnel Id Switched interface

500 Pop Label 4.4.4.4/32 0 Se1/1 point2point

501 No Label 6.6.6.6/32[V] 570 Fa0/0 56.1.1.6

502 No Label 56.1.1.0/24[V] 0 aggregate/mpls56

R4#sh mpls forwarding-table

Local Outgoing Prefix Bytes Label Outgoing Next Hop

Label Label or Tunnel Id Switched interface

400 Pop Label 5.5.5.5/32 0 Se1/1 point2point

401 No Label 0.0.0.0/0[V] 570 Fa0/1 14.1.1.1

1-4察看MP-BGP

R5#sh ip bgp vpnv4 all labels \\察看VPNV4关联的标签

Network Next Hop In label/Out label

Route Distinguisher: 1:1 (mpls56)

0.0.0.0 4.4.4.4 nolabel/401

6.6.6.6/32 56.1.1.6 501/nolabel

56.1.1.0/24 0.0.0.0 502/nolabel(mpls56)

R4#sh ip bgp vpnv4 rd 1:1 //查看MP-BGP RD为1:1的路由信息

BGP table version is 6, local router ID is 4.4.4.4

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

Route Distinguisher: 1:1 (default for vrf mpls14)

*> 0.0.0.0 14.1.1.1 0 32768 ?

*>i6.6.6.6/32 5.5.5.5 2 100 0 ?

*>i56.1.1.0/24 5.5.5.5 0 100 0 ?

R5#sh ip bgp vpnv4 rd 1:1 //查看MP-BGP RD为1:1的路由信息

BGP table version is 5, local router ID is 5.5.5.5

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

Route Distinguisher: 1:1 (default for vrf mpls56)

*>i0.0.0.0 4.4.4.4 0 100 0 ?

*> 6.6.6.6/32 56.1.1.6 2 32768 ?

*> 56.1.1.0/24 0.0.0.0 0 32768 ?

R4#sh ip bgp vpnv4 all 6.6.6.6

BGP routing table entry for 1:1:6.6.6.6/32, version 5

Paths: (1 available, best #1, table mpls14)

Not advertised to any peer

Local

5.5.5.5 (metric 2297856) from 5.5.5.5 (5.5.5.5)

Origin incomplete, metric 2, localpref 100, valid, internal, best

Extended Community: RT:16:16 OSPF DOMAIN ID:0x0005:0x000000380200

OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:56.1.1.5:0 //MP-BGP所携带的扩展社团属性

mpls labels in/out nolabel/501

2-构建单臂路由

主要是在R1的F0/0 接口下配置

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

!

interface FastEthernet0/0.1

encapsulation dot1Q 1 native

ip address 10.200.4.254 255.255.255.0

!

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 10.200.43.254 255.255.255.0

!

interface FastEthernet0/1

ip address 14.1.1.1 255.255.255.0

duplex auto

speed auto

SW1---R1 之间为trunk链路 SW3-SW2之间为trunk链路

测试结果就是:

PC9-PC8-PC7 可以相互ping通,且都可以ping通6.6.6.6

试验拓扑图可以在我的网盘下载到

[实例]H&M SH office 2 IP地址段扩容

时间: 2024-08-25 17:33:42

[实例]H&M SH office 2 IP地址段扩容的相关文章

线段树+离散化 IP地址段检查 SEGMENT TREE

Problem: Give a series of IP segments, for example, [0.0.0.1-0.0.0.3], [123.234.232.21-123.245.21.1]... Now there is a new IP, find which IP segment it's in ? Solution: First, we could map the ends of IP segments into some intervals, since the IP add

Linux下如何批量生成IP地址段?

Linux下如何批量生成IP地址段? for num in `echo 192.168.2.{1..254}`;do echo $num >> ip_list;done 说明:定义一个名为num的变量,变量内容为echo 192.168.2.{1..254},然后输出到ip_list这个文件下面 生成文件的截图

中小企业openstack私有云布署实践【19 通过python客户端 启动实例时手工指定固定的IP地址】

还有一种创建方式 是使用py开发工具,调用openstackclient的方法进行创建实例 ,好处就是可随意指定我们要的虚拟机IP地址,需求的场景就是,某天我们需要主动分配一个比较熟知的IP用作某个服务组件 或者某天,你需要打包一个实例的快照,终止实例后,你想通过快照的方式将它恢复为原来的IP,可以使用以下方法. 以win7客户端为例. 先下载安装eclipse 安装 安装 eclipse 的python插件,插件安装方法可自行百度 本机,安装python2.7环境 安装完后,添加python到

php禁用某ip或者ip地址段访问

因为还没有深入学习Apache和nginx 所以用PHP写了一个可以禁用地址的小程序 用法 <?php include("banIP.php");?>即可 禁用单个ip: <?php //禁用ip地址 $ip=$_SERVER["REMOTE_ADDR"]; $ban=file_get_contents("ban.dat"); if(stripos($ban,$ip)) { die("Your IP Address i

IP地址段分析

127为回环测试地址,因此,A类ip地址的实际范围是1-126. B类128.0.0.0 – 191.255.255.255 netMask:255.255.0.0其中128.0.0.0和191.255.0.0为保留ip,实际范围是128.1.0.0–191.254.0.0 C类192.0.0.0-223.255.255.255 netMask:255.255.255.0其中192.0.0.0和223.255.255.0为保留ip,实际范围是192.0.1.0–223.255.254.0 D类

搭建DHCP服务实现动态分配IP地址【详解】

搭建DHCP服务实现动态分配IP地址   一:实验内容 DHCP服务器工作原理 使用DHCP为局域网中的机器分配IP地址 使用DHCP为服务器分配固定IP地址   二:实验环境: 服务端:xuegod63  IP:192.168.1.70 客户端:RHEL-6.2-64-71  IP:192.168.1.71 客户端:RHEL-6.2-64-72  IP:192.168.1.72   三:实验步骤 第一块:概述 1:DHCP服务概述: 名称:DHCP  - Dynamic Host Config

Linux C打印IP地址信息

1.由文件描述符打印IP地址及端口.(参考) #include <stdio.h> #include <netdb.h> #include <sys/socket.h> #include <arpa/inet.h> //由文件描述符打印对应IP地址和端口 void PrintAddrByFd(int sockfd) { struct sockaddr_in addr_in; socklen_t len = sizeof(addr_in); getsockna

redis技巧--IP地址查询对应城市

场景: 根据IP地址判断用户所在地,虽然网上有好多篇了,但我记录一个一看就懂的,不用看超长文字再自己理解了. 我们有城市和IP地址段的对应关系,如: 上海: 202.127.0.0 ~ 202.127.4.255 北京: 122.200.64.0 ~ 122.207.255.255 此时如果用户的IP地址为122.202.2.0,我们就能根据这个表知道他的地址位于北京. 方法: 使用有序集合记录这个表,每个城市存储两条数据,一条是城市名对应的分数为最大IP地址.另一条是“#”加上城市名对应的分数

[转]用Whois获得电信运营商的IP地址是如何分配的?

[转]用Whois获得电信运营商的IP地址是如何分配的? Linux下获得一些中国电信运营商的IP地址分配情况: APNIC是管理亚太地区IP地址分配的机构,它有着丰富准确的IP地址分配库,同时这些信息也是对外公开的,并提供了一个查询工具,下面就让我们看看如何在Linux下获得一些中国基础电信运营商(网通.电信.铁通.教育网)的IP地址分配情况: (我们平时用whois查询是知道域名或IP查信息, 这里用的是知道地理区域批量查IP及其信息) wget http://ftp.apnic.net/a