首页 > 其他分享 >Experiment

Experiment

时间:2024-04-01 14:57:28浏览次数:21  
标签:g0 int 0.0 vlan Experiment user ip

要求:
配置Telnet,要求所有网络设备均支持远程管理,密码为admin
配置Trunk,交换机之间的链路均为Trunk模式
配置VLAN,在SW2和SW3上创建相关VLAN,关联4台PC到对应的VLAN接口
配置MLS,通过SW1实现VLAN间路由
配置DHCP,使SW1可以为各个VLAN内主机分配地址信息
配置STP,使SW1成为所有VLAN的根桥,要求手动修改优先级为4096
配置OSPF,企业内网运行OSPF 1
配置缺省和NAT,在R1上配置静态缺省路由,SW1通过OSPF学习缺省路由
配置NAT,在R1上配置PAT(只需要转换四个VLAN网段)
配置PPP,R1和R2之间封装协议为PPP,使用CHAP双向认证,密码均为huawei
配置OSPF,R2、R3、R4之间运行OSPF 2
配置DNS,可以通过www.aaa.com访问HTTP服务器,通过www.bbb.com访问FTP服务器
配置ACL,在R1上配置ACL,拒绝VLAN20的主机通过浏览器访问HTTP服务器,其他流量不受影响

sys 
sysn R1

int g0/0/0
ip add 192.168.12.1 24
int g0/0/1
ip add 1.0.0.2 30
int s2/0/0
ip add 12.0.0.1 24

ip route-static 0.0.0.0 0 12.0.0.2
ospf 1 router-id 1.1.1.1
default-route-advertise
a 0
network 192.168.12.1 0.0.0.0
network 1.0.0.2 0.0.0.0

acl 2000
rule 10 permit
int s2/0/0
nat outbound 2000

int s2/0/0
ppp chap user huawei
ppp chap password cipher admin

link-protocol ppp
aaa
local-user huawei password cipher admin
local-user huawei service-type ppp
int s2/0/0
ppp authentication-mode chap

user-interface vty 0 4 
authentication-mode aaa
aaa
local-user zx password cipher admin
local-user zx privilege level 15
local-user zx service-type telnet terminal

sys
sysn SW1

vlan batch 10 20 30 40
int vlanif 10
ip add 192.168.10.254 24
int vlanif 20
ip add 192.168.20.254 24
int vlanif 30
ip add 192.168.30.254 24
int vlanif 40
ip add 192.168.40.254 24

int g0/0/1
port lin a
p d vlan 1
int g0/0/2
p l t
p t a vlan 10 20
int g0/0/3
p l t
p t a vlan 30 40
q

dhcp enable
int vlanif 10 
dhcp select interface 
dhcp server dns-list 3.0.0.1
int vlanif 20 
dhcp select interface 
dhcp server dns-list 3.0.0.1
int vlanif 30 
dhcp select interface 
dhcp server dns-list 3.0.0.1
int vlanif 40 
dhcp select interface 
dhcp server dns-list 3.0.0.1

ospf 1 router-id 2.2.2.2
a 0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.30.0 0.0.0.255
network 192.168.40.0 0.0.0.255
network 192.168.12.2 0.0.0.0

stp mode stp 
stp priority 4096

user-interface vty 0 4 
authentication-mode aaa
aaa
local-user zx password cipher admin
local-user zx privilege level 15
local-user zx service-type telnet terminal

sys
sysn SW2

vlan batch 10 20 30 40
int g0/0/1
p l t
p t a vlan 10 20 30 40
int g0/0/2
p l t 
p t a vlan 10 20 30 40
int g0/0/3
p l a
p d vlan 10
int g0/0/4
p l a
p d vlan 20

user-interface vty 0 4 
authentication-mode aaa
aaa
local-user zx password cipher admin
local-user zx privilege level 15
local-user zx service-type telnet terminal

sys
sysn SW3

vlan batch 10 20 30 40
int g0/0/1
p l t
p t a vlan 10 20 30 40
int g0/0/2
p l t
p t a vlan 10 20 30 40
int g0/0/3
p l a
p d vlan 30
int g0/0/4
p l a 
p d vlan 40

user-interface vty 0 4 
authentication-mode aaa
aaa
local-user zx password cipher admin
local-user zx privilege level 15
local-user zx service-type telnet terminal

sys
sysna R2

int s2/0/0
ip add 12.0.0.2 24
int g0/0/0
ip add 23.0.0.1 24
int g0/0/1
ip add 24.0.0.1 24
int s2/0/0
link-protocol ppp
ppp chap user huawei
ppp chap password cipher admin

aaa
local-user huawei password cipher admin
local-user huawei service-type ppp
int s2/0/0
ppp authentication-mode chap


ospf 2
a 0
net 12.0.0.0 0.0.0.3
net 23.0.0.1 0.0.0.0
net 24.0.0.1 0.0.0.0

sys
sysn R3

vlan 100
int vlanif 100
ip add 3.0.0.254 24
int g0/0/1
ip add 23.0.0.2 24
int g0/0/0
ip add 34.0.0.1 24
int e0/0/0
p l a
p d vlan 100

ospf 2 router-id 3.3.3.3
a 0
net 3.0.0.0 0.0.0.255
net 34.0.0.0 0.0.0.255
net 23.0.0.0 0.0.0.255

sys
sysn R4

vlan 200
int vlanif 200
ip add 4.0.0.254 24
int g0/0/1
ip add 24.0.0.2 24
int g0/0/0
ip add 34.0.0.2 24
int e0/0/0
p l a 
p d vlan 200

ospf 2 router-id 4.4.4.4
a 0
net 4.0.0.0 0.0.0.255
net 24.0.0.0 0.0.0.255
net 34.0.0.0 0.0.0.255

标签:g0,int,0.0,vlan,Experiment,user,ip
From: https://www.cnblogs.com/zx654042919/p/18108387

相关文章

  • Google的Jax框架的JAX-Triton目前只能成功运行在TPU设备上(使用Pallas为jax编写kernel
    使用Pallas为jax编写kernel扩展,需要使用JAX-Triton扩展包。由于Google的深度学习框架Jax主要是面向自己的TPU进行开发的,虽然也同时支持NVIDIA的GPU,但是支持力度有限,目前JAX-Triton只能在TPU设备上正常运行,无法保证在GPU上正常运行。该结果使用kaggle上的TPU和GPU进行测试获得。......
  • Experiment7
    #include<stdio.h>intmain(){intnum=0;charch;FILE*fp;fp=fopen("D:\data4.txt","r");if(fp==NULL){printf("fail\n");return1;}while(!feof(fp)){ch=fgetc(fp);......
  • experiment7
    task4//task4#include<stdio.h>intmain(){inti=0;charch;FILE*fp;fp=fopen("data4.txt","r");if(fp==NULL){printf("读取失败\n");return1;}whi......
  • 遇到chrome_options.add_experimental_option ("debuggerAddress", port_number)调起
    1、查看谷歌版本和chromedriver版本是否一致:手动查找ChromeDriver路径。在终端中输入以下命令:whichchromedriver这将输出ChromeDriver的路径,例如:/usr/local/bin/chromedriver可以在Chrome浏览器中输入以下网址来查看版本信息: chrome://version/在命令行中,你可以......
  • experiment6
    1//P286例8.17//对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块//打印不及格学生信息和所有学生信息程分别调用#include<stdio.h>#include<string.h>#defineN3//运行程序输入测试时,可以把这个数组改小一些输入测试typedefstructstudent{int......
  • Experiment6
    task4#include<stdio.h>#include<string.h>#defineN100typedefstruct{charnum[10];ints1;ints2;doublesum;charlevel[10];}STU;intfun(STUa[],intn,STUh......
  • experiment 5
    1#include<stdio.h>#defineN4intmain(){intx[N]={1,9,8,4};inti;int*p;for(i=0;i<N;++i)printf("%d",x[i]);printf("\n");return0;}    1.2 #include<stdio.h>intmain(){intx[2][4]={{1,9,8,4},{2,0,4,9}};inti,......
  • Experiment5
    #include<stdio.h>#defineN4intmain(){intx[N]={1,9,8,4};inti;int*p;for(i=0;i<N;++i)printf("%d",x[i]);printf("\n");for(p=x;p<x+N;++p)pri......
  • Chemistry Experiment Codeforces Round 247 (Div. 2) 线段树动态开点,二分
    第一次写的时候还不会线段树的动态开点,写了一个是线段树但是是\(O(N^2)\)的写法,现在用动态开点武装了自己,会了正解\(O(qlogn^2)\)。首先建立一个权值线段树,但这里的权值很大,通过动态开点去建树来节省空间,对于两种操作:操作1,常见的动态开点的单点修改操作2,二分答案,然后在线段树......
  • Experiment3
    #include<stdio.h>#include<stdlib.h>#include<time.h>#include<windows.h>#defineN80voidprint_text(intline,intcol,chartext[]);//函数声明voidprint_spaces(intn);//函数声明voidprint_blank_lines(intn);//函数声明intmain......