现在的位置: 首页 > 综合 > 正文

网络配置笔记

2018年03月19日 ⁄ 综合 ⁄ 共 7834字 ⁄ 字号 评论关闭

            企业内部网结构

一、VLAN

TTL---Time To Live 存活时间。

 

TTL=255  说明你ping的是一台路由器、交换机或防火墙。

TTL=128  对端是一台Windows主机

TTL=64   是Linux/Unix主机

 

概念:VLAN---Virtual Local AreaNetwork 虚拟局域网。作用:隔离广播域。

            一个部门一个VLAN、科室、院系、营连排、教室。

     VTP---VLAN Trunk Protocol VLAN的干道/中继协议。

 

Switch>en

Switch#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Switch(config)#ho Floor_3

Floor_3#vlan database   进入VLAN的数据库模式。

% Warning: It is recommendedto configure VLAN from config mode,

  as VLAN database mode is being deprecated.Please consult user

  documentation for configuring VTP/VLAN inconfig mode.

 

Floor_3(vlan)#vtp domainNeusoft  起一个VTP域名。

Changing VTP domain name fromNULL to Neusoft

Floor_3(vlan)#vtp server   指定是服务器

Device mode already VTPSERVER.

Floor_3(vlan)#vtp password111  设置VTP密码。

Setting device VLAN databasepassword to 111

Floor_3(vlan)#vlan 88 nameRoom310

VLAN 88 added:

    Name: Room310

Floor_3(vlan)#vlan 89 nameRoom309

VLAN 89 added:

    Name: Room309

Floor_3(vlan)#exit

APPLY completed.

Exiting....

Floor_3#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Floor_3(config)#int g0/1

Floor_3(config-if)#switchportmode trunk

===============================================================================

 

Switch>en

Switch#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Switch(config)#ho Room310

Room310(config)#

Room310(config)#

Room310(config)#int g1/2

Room310(config-if)#sw mo tr

Room310#vl da

% Warning: It is recommendedto configure VLAN from config mode,

  as VLAN database mode is being deprecated.Please consult user

  documentation for configuring VTP/VLAN inconfig mode.

 

Room310(vlan)#vtp client

Setting device to VTP CLIENTmode.

Room310(vlan)#vtp pass 111

Setting device VLAN databasepassword to 111

Room310(vlan)#exit

APPLY completed.

Exiting....

=================================================================

Room310#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Room310(config)#

Room310(config)#

Room310(config)#int f0/1

Room310(config-if)#switchportmode access

Room310(config-if)#switchportaccess vlan 88

Room310(config-if)#int f0/2

Room310(config-if)#switchportmode access

Room310(config-if)#switchportaccess vlan 88

 

 

Room309#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Room309(config)#int f0/1

Room309(config-if)#sw mo acc

Room309(config-if)#sw acc vl89

Room309(config-if)#int f0/2

Room309(config-if)#sw mo acc

Room309(config-if)#sw acc vl89

 

======================================================================

Floor_3(config)#int vlan 88

 

%LINK-5-CHANGED: InterfaceVlan88, changed state to up

%LINEPROTO-5-UPDOWN: Lineprotocol on Interface Vlan88, changed state to upFloor_3(config-if)#

Floor_3(config-if)#

Floor_3(config-if)#ip add10.10.30.65 255.255.255.192

Floor_3(config-if)#no sh

Floor_3(config-if)#

Floor_3(config-if)#

Floor_3(config-if)#int vl 89

 

%LINK-5-CHANGED: InterfaceVlan89, changed state to up

%LINEPROTO-5-UPDOWN: Lineprotocol on Interface Vlan89, changed state to upFloor_3(config-if)#

Floor_3(config-if)#ip add10.10.30.1 255.255.255.192

Floor_3(config-if)#no sh

Floor_3(config-if)#

Floor_3(config-if)#

Floor_3(config-if)#

Floor_3(config-if)#ip routing

 

 

===============================================================================

三、ACL

Access Control List 访问控制列表

标准访问控制列表示例:

 

沈阳能与上海通信(ping telnet)

拒绝沈阳与上海通信,允许南昌与上海通信。

ShangHai(config)#access-list 1deny 1.0.0.0 0.255.255.255

ShangHai(config-if)#access-list1 permit any

ShangHai(config)#int f0/0

ShangHai(config-if)#ipaccess-group 1 in

 

 

 

扩展访问控制列表示例

让沈阳能远程登录到上海,但是ping不通。

ShangHai(config)#access-list100 permit tcp any 2.2.2.2 0.0.0.0 eq 23

ShangHai(config)#int f0/0

ShangHai(config-if)#ipaccess-group 100 in

 

 

思考题:让沈阳能ping通上海,但是远程登录不上。

 

 

 

 

路由器和交换机的应用

一、路由器的基本配置

 

Router>用户模式

Router>enable 进入到特权模式

Router#configure terminal  进入到配置模式。

Router(config)#hostnameShenYang

ShenYang(config)#interfaceserial 0/0  进入到接口模式。

ShenYang(config-if)#ip address1.1.1.1 255.0.0.0

ShenYang(config-if)#clock rate64000

ShenYang(config-if)#noshutdown

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

Router>en

Router#conf t

Enter configuration commands,one per line.  End with CNTL/Z.

Router(config)#ho NanChang

NanChang(config)#int s0/0

NanChang(config-if)#ip add1.1.1.2 255.0.0.0

NanChang(config-if)#no sh

NanChang(config)#end  从任何模式退回到特权模式。

NanChang#

%SYS-5-CONFIG_I: Configuredfrom console by console

NanChang#ping 1.1.1.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echosto 1.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent(5/5), round-trip min/avg/max = 31/31/32 ms

 

 

NanChang#showrunning-config  查看当前的配置。

 

NanChang#copy running-configstartup-config

Destination filename[startup-config]?

Building configuration...

[OK]

 

 

配置远程连接

NanChang(config)#line vty 0 4

NanChang(config-line)#passwordwahaha

NanChang(config-line)#login

NanChang(config-line)#enablesecret wahaha

 

 

二、NAT

Network Address Translation 网络地址转换

 

ShenYang(config)#access-list 1permit 192.168.1.22  定义要允许NAT的IP地址。

ShenYang(config)#access-list 1permit 192.168.1.23

ShenYang(config)#ip nat poolohyeah 1.1.1.1 1.1.1.1 netmask 255.0.0.0 定义一个地址池名称为ohyeah,地址池中地址范围                                           1.1.1.1---1.1.1.1。

ShenYang(config)#ip nat insidesource list 1 pool ohyeah overload  指定是内部源地址转换让访问控制列表1中定义的源地址可以上网,并应用地址池ohyeah,将私有IP地址转成地址池中的公网IP,并且复用。

 

ShenYang(config)#int f0/0

ShenYang(config-if)#ip natinside  指定内网接口。

ShenYang(config-if)#int s0/0

ShenYang(config-if)#ip natoutside  指定外网接口。

 

 

 

 

FTP服务

一、概述

FTP---File Transfer Protocol 文件传输协议

文件传输方式种类:

局域网:

1、共享文件夹

   方便、速度慢、中病毒。

2、飞鸽、飞秋、Netmeeting等局域网聊天软件

   速度快、不专业、某些企业禁止使用此类软件

3、E-Mail

  容量和速度的限制

4、FTP服务

 

公网上:

1、共享文件夹(VPN)

   方便、速度慢、中病毒。

2、飞鸽、飞秋、Netmeeting等局域网聊天软件(VPN)

   速度快、不专业、某些企业禁止使用此类软件

3、E-Mail

  容量和速度的限制

4、FTP服务

 

插播:

VPN---Virtual Private Network

跨国、跨省市自治区的企业。 移动办公用户。

 

 

二、架构一个FTP

2.1 安装FTP服务

添加/删除Windows 组件----应用程序服务器----IIS----FTP

C:\Documents andSettings\ttc>ftp 172.16.25.252

Connected to 172.16.25.252.

220 Microsoft FTP Service

User (172.16.25.252:(none)):anonymous   匿名用户名。

331 Anonymous access allowed,send identity (e-mail name) as password.

Password:   默认为空

230 Anonymous user logged in.

ftp>

ftp>

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

C:\Documents andSettings\ttc>ftp 172.16.25.252

Connected to 172.16.25.252.

220 Microsoft FTP Service

User (172.16.25.252:(none)):ftp  用户名ftp

331 Anonymous access allowed,send identity (e-mail name) as password.

Password:  密码也是ftp

230 Anonymous user logged in.

ftp>

 

 

 

==============================================================================

ftp> ?

Commands may beabbreviated.  Commands are:

 

!               delete          literal         prompt          send

?               debug           ls             
put
             status

append          dir             mdelete         pwd             trace

ascii           disconnect      mdir           
quit
           type

bell            get            
mget
           quote           user

binary          glob            mkdir           recv            verbose

bye             hash            mls             remotehelp

cd              help            mput
           rename

close           lcd             open            rmdir

 

ftp> get hehe.rar

200 PORT command successful.

150 Opening ASCII mode dataconnection for hehe.rar(15 bytes).

226 Transfer complete.

ftp: 收到 15 字节,用时 0.00Seconds15000.00Kbytes/sec.

ftp> get hehe.rarc:\haha.rar

200 PORT command successful.

150 Opening ASCII mode dataconnection for hehe.rar(15 bytes).

226 Transfer complete.

ftp: 收到 15 字节,用时 0.00Seconds15000.00Kbytes/sec.

 

 

 

 

 

 

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

 

 

 

网络及其计算

一、域的环境

SID会相同,克隆的操作系统,则需要重新生成SID。

进入光盘SUPPORT\TOOLS\DEPLOY.CAB 双击将其中的setupcl.exesysprep.exe拷贝到桌面,再双击sysprep.exe。

 

Ctrl+Alt+Insert代替Ctrl+Alt+Delete

 

1.1 安装活动目录服务

先设置老板PC的IP,如下图:

然后设置员工PC的IP,如下图:

验证他们之间的连通性。

 

 

老板的机器上:

  运行---dcpromo

  设置密码

员工机器上:

 右击我的电脑----属性----计算机名----更改----neusoft.com ----输入服务器的用户名:adminstrator

                                          密码:********

 出现:“欢迎加入neusoft.com域”即为成功 。

 

问题:

1、加入域提示找不到域。

   DNS问题:员式的PC的DNS设置为老板PC的IP。

2、物理内存不足。

   关闭不必要的服务、增加虚拟内存。

 

3、密码

   必须包含a-z A-Z 0-9 !@#$特殊符号这四组中的三组。

   至少6位

   密码不允许有和用户名相同的字符

 

 

 

 

===========================================================================================

二、域的基本设置权限的分发

2.1 测试登录

老板----管理工具---AD用户和计算机---右击neusoft.com---新建---组织单位----右边新建用户。

 

客户端:登录用户名 rs001@neusoft.com

                  *********

 

 

 

2.2 设置登录时间

2.3 用户密码

   重设置密码

   禁用账户

   限制输入密码的次

刷新计算机 gpupdate /target:computer

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

抱歉!评论已关闭.