博客统计信息

51cto推荐博客
用户名:oshoo
文章数:17
评论数:83
访问量:34801
无忧币:426
博客积分:1154
博客等级:5
注册日期:2007-01-07

 一,什么是Nginx

Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器 。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的Rambler.ru 站点开发的,它已经在该站点运行超过四年多了。Igor 将源代码以类BSD许可证的形式发布。自Nginx 发布四年来,Nginx 已经因为它的稳定性、丰富的功能集、 示例配置文件和低系统资源的消耗而闻名了。目前国内各大门户网站已经部署..
类别:Linux|阅读(134)|回复(1)|(2)阅读全文>>
2012-01-16 08:35:44
许多年前,汤普逊老师对着她五年级的学生们撒了一个谎,说她会平等地爱每个孩子!但这是不可能的,因为前排坐着泰迪史塔特,是一个邋遢、上课不专心的小男孩。汤普逊老师很喜欢用粗红笔在泰迪的考卷上画大大的叉,然后在最上排写个不及格!
某一天,汤普逊老师检视每个学生以前的学习纪录表,她意外地发现泰迪之前的老师给的评语十分惊人。
一年级老师写道:「泰迪是个聪明的孩子,永远面带笑容,他的作业很整洁、很有礼貌,他让周遭的人很快乐!」
二年级老师说:「泰迪很优秀,很受同学欢迎,但他的母亲罹患了绝症,他很担心,家..
MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0
很早我就“参加”了工作,说是参加了工作,其实认真想一下,不过是找了份糊口的差事。那是在96年,厌倦了大学的枯燥乏味,在武汉的电脑城找到了第一份工作---投影仪销售(其实当时我什么都不懂),月薪300,不包食宿,更谈不上保险(那时也没有保险)。就这样把青春交给了“资本家”。“混”了小半年后,就炒了老板的鱿鱼。
第二家公司老板人很好,在大学里带实验,姓唐,没有架子(我们都叫他小唐,其实他当时应该30多了),公司的名子..
类别:其他|阅读(1278)|回复(30)|(32)阅读全文>>
原创作品谢绝转载!

两个EIGRP AS系统左边为AS 50,右边为AS 100。
1,实现AS内部的互联互通

2,在R3,R4上分别做默认路由
     r3(config)#ip route 0.0.0.0 0.0.0.0 s1/0

     r4(config)#ip route 0.0.0.0 0.0.0.0 s1/2

3,R3,R4上分别做静态路由的重发布
     r3(config)#router eig 50
     r3(config-router)#redistribute static

     r4(config)#router ei 100
     r4(config-router)#redistribute static

4,验证

     r1#show ip rout
Codes: 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

Gateway of last resort is 13.13.13.3 to network 0.0.0.0

     34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       34.34.34.0/24 [90/2681856] via 13.13.13.3, 00:25:22, Serial1/0
D EX    34.0.0.0/8 [170/2681856] via 13.13.13.3, 00:25:22, Serial1/0
     1.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C       1.1.0.0/24 is directly connected, Loopback0
D       1.1.0.0/16 is a summary, 00:25:27, Null0
C       1.1.1.0/24 is directly connected, Loopback1
C       1.1.2.0/24 is directly connected, Loopback2
C       1.1.3.0/24 is directly connected, Loopback3
C       1.1.4.0/24 is directly connected, Loopback4
     2.0.0.0/16 is subnetted, 1 subnets
D       2.2.0.0 [90/2809856] via 13.13.13.3, 00:22:53, Serial1/0
     23.0.0.0/24 is subnetted, 1 subnets
D       23.23.23.0 [90/2681856] via 13.13.13.3, 00:25:24, Serial1/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, Serial1/0
D*EX 0.0.0.0/0 [170/2681856] via 13.13.13.3, 00:25:24, Serial1/0

r1#p 56.56.56.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 56.56.56.5, timeout is 2 seconds:
!!!!!



[/img]..
       本文请勿转载,如需转载请与作者联系,否则将追究法律责任。
      这段时间一直在“玩”路由交换,咱是穷人,肯定买不起那些高昂的设备,所以只能用模拟器“过过瘾”,意淫一下。说到CISCO的模拟器,最好用的当宿GNS3(个人意见),其优点如下:
        1,免费。而且还是开源软件。我一向信奉:不要钱的就是最好的。
        2,图形化界面,使用简单,丰简由人。
     &nbs..
类别:其他|阅读(842)|回复(7)|(3)阅读全文>>
2009-03-25 18:49:45
      这段时间比较忙,所以很多实验就没花时间写详细的讲解,直接把 SHOW RUN的内容贴上来了,还请大家海涵!!!
      闲话少说,上图

 
以下是配置
 
r1#SHOW run
Building configuration...
Current configuration : 1146 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
no ip domain lookup
!
!        
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
 ip address 12.12.12.1 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router eigrp 1
 passive-interface Loopback0
 network 1.1.1.0 0.0.0.255
 network 12.12.12.0 0.0.0.255
 no auto-summary
!
router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 network 12.12.12.0 mask 255.255.255.0
 neighbor 12.12.12.2 remote-as 234
 neighbor 12.12.12.2 ebgp-multihop 2
 neighbor 12.12.12.2 update-source Ethernet0/0
 no auto-summary
!
ip http server
!
!
!
cdp timer 5
cdp holdtime 10
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 

r2#show run
Building configuration...
Current configuration : 1400 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
no ip domain lookup
!
!        
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
 ip address 12.12.12.2 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 23.23.23.2 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!        
router eigrp 234
 passive-interface Loopback0
 network 12.12.12.0 0.0.0.255
 network 23.23.23.0 0.0.0.255
 no auto-summary
!
router bgp 234
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 12.12.12.0 mask 255.255.255.0
 network 23.23.23.0 mask 255.255.255.0
 neighbor 12.12.12.1 remote-as 1
 neighbor 12.12.12.1 ebgp-multihop 2
 neighbor 12.12.12.1 update-source Ethernet0/0
 neighbor 23.23.23.3 remote-as 234
 neighbor 23.23.23.3 update-source Ethernet0/1
 neighbor 23.23.23.3 next-hop-self
 neighbor 34.34.34.4 remote-as 234
 neighbor 34.34.34.4 update-source Ethernet0/1
 neighbor 34.34.34.4 next-hop-self
 no auto-summary
!        
ip http server
!
!
!
cdp timer 5
cdp holdtime 10
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 

r3#show run
Building configuration...
Current configuration : 1231 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
no ip domain lookup
!
!        
!
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/0
 ip address 23.23.23.3 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 34.34.34.3 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!        
router eigrp 234
 network 23.23.23.0 0.0.0.255
 network 34.34.34.0 0.0.0.255
 no auto-summary
!
router bgp 234
 no synchronization
 bgp log-neighbor-changes
 network 23.23.23.0 mask 255.255.255.0
 network 34.34.34.0 mask 255.255.255.0
 neighbor 23.23.23.2 remote-as 234
 neighbor 23.23.23.2 update-source Ethernet0/0
 neighbor 23.23.23.2 next-hop-self
 neighbor 34.34.34.4 remote-as 234
 neighbor 34.34.34.4 update-source Ethernet0/1
 neighbor 34.34.34.4 next-hop-self
 no auto-summary
!
ip http server
!
!
!
cdp timer 5
cdp holdtime 10
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 
r4#show run
Building configuration...
Current configuration : 1371 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
no ip domain lookup
!
!        
!
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
!
interface Ethernet0/0
 ip address 34.34.34.4 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 45.45.45.4 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!        
router eigrp 234
 network 34.34.34.0 0.0.0.255
 network 45.45.45.0 0.0.0.255
 no auto-summary
!
router bgp 234
 no synchronization
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 network 34.34.34.0 mask 255.255.255.0
 network 45.45.45.0 mask 255.255.255.0
 neighbor 23.23.23.2 remote-as 234
 neighbor 23.23.23.2 update-source Ethernet0/0
 neighbor 23.23.23.2 next-hop-self
 neighbor 34.34.34.3 remote-as 234
 neighbor 34.34.34.3 update-source Ethernet0/0
 neighbor 34.34.34.3 next-hop-self
 neighbor 45.45.45.5 remote-as 2
 neighbor 45.45.45.5 ebgp-multihop 5
 neighbor 45.45.45.5 update-source Ethernet0/1
 no auto-summary
!
ip http server
!
!
!
cdp timer 5
cdp holdtime 10
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end
 
 
r5#show run
Building configuration...
Current configuration : 1110 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
no ip domain lookup
!
!        
!
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!
interface Ethernet0/0
 ip address 45.45.45.5 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router eigrp 2
 passive-interface Loopback0
 network 5.5.5.0 0.0.0.255
 network 45.45.45.0 0.0.0.255
 no auto-summary
!
router bgp 2
 no synchronization
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 network 45.45.45.0 mask 255.255.255.0
 neighbor 45.45.45.4 remote-as 234
 neighbor 45.45.45.4 ebgp-multihop 2
 neighbor 45.45.45.4 update-source Ethernet0/0
 no auto-summary
!
ip http server
!
!
!
cdp timer 5
cdp holdtime 10
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 login
!
end[/img]..
这是最近做的一个实验:
1,EIGRP和OSPF相互重分发。2,过滤某些不需要的路由。3,优化路由条目。
东西比较多,大家看的时候耐心点。如果有什么不妥的地方还请大家给予指正!

R1#show run
Building configuration...
Current configuration : 1389 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.10.4.1 255.255.255.240
!
interface Loopback1
 ip address 10.10.4.17 255.255.255.240
!
interface Loopback2
 ip address 10.10.4.33 255.255.255.240
!
interface Loopback3
 ip address 10.10.4.49 255.255.255.240
!
interface Loopback4
 ip address 10.10.4.65 255.255.255.240
!
interface FastEthernet0/0
 ip address 1.1.1.1 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 124
 network 1.1.1.0 0.0.0.255
 network 10.10.4.0 0.0.0.15
 network 10.10.4.16 0.0.0.15
 network 10.10.4.32 0.0.0.15
 network 10.10.4.48 0.0.0.15
 network 10.10.4.64 0.0.0.15
 no auto-summary
!
ip classless
no ip http server
!
!
cdp timer 5
cdp holdtime 10
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end

 
R2#show run
Building configuration...
Current configuration : 1064 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 10.10.2.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.1.2 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 ip address 2.2.2.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 124
 network 1.1.1.0 0.0.0.255
 network 2.2.2.0 0.0.0.255
 network 10.10.2.0 0.0.0.255
 no auto-summary
!
ip classless
no ip http server
!
!
cdp timer 5
cdp holdtime 10
!
!
!
!        
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!        
end

 
R3#show run
Building configuration...
Current configuration : 1400 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 3.3.3.1 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 ip address 2.2.2.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 124
 redistribute ospf 1 metric 10000 100 255 1 1500 route-map o2e
 network 2.2.2.0 0.0.0.255
 no auto-summary
!
router ospf 1
 log-adjacency-changes
 summary-address 10.10.4.0 255.255.255.192
 redistribute eigrp 124 subnets route-map test
 network 3.3.3.0 0.0.0.255 area 0
!
ip classless
no ip http server
!
!
access-list 1 permit 10.10.4.64 0.0.0.15
access-list 2 permit 20.20.5.0 0.0.0.255
cdp timer 5
cdp holdtime 10
!
route-map test deny 10
 match ip address 1
!
route-map test permit 20
!
route-map o2e deny 10
 match ip address 2
!
route-map o2e permit 20
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end
 
R4#show run
Building configuration...
Current configuration : 1059 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 3.3.3.2 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 ip address 4.4.4.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 area 35 stub no-summary
 area 35 range 20.20.0.0 255.255.248.0
 network 3.3.3.0 0.0.0.255 area 0
 network 4.4.4.0 0.0.0.255 area 35
!
ip classless
no ip http server
!
!
cdp timer 5
cdp holdtime 10
!
!
!
!
!
!        
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end

 
 
R5#show run
Building configuration...
Current configuration : 1529 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
no ip domain lookup
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 20.20.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback1
 ip address 20.20.2.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback2
 ip address 20.20.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback3
 ip address 20.20.4.1 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback4
 ip address 20.20.5.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet1/0
 ip address 4.4.4.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 area 35 stub
 network 4.4.4.0 0.0.0.255 area 35
 network 20.20.1.0 0.0.0.255 area 35
 network 20.20.2.0 0.0.0.255 area 35
 network 20.20.0.0 0.0.255.255 area 35
!
ip classless
no ip http server
!
!
cdp timer 5
cdp holdtime 10
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end[/img]..
申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。
 
环境如下:其中最左边的ROUTER模拟PC,中间的ROUTER做代理服务器,最后一台做DHCP服务器

目标:PC上能自动获得IP地址
 
1,pc上的配置
en
conf t
host pc
inter f0/0
ip add dhcp              ip地址为从DHCP获取
no shut
 
以下是show run看到的
pc#show run
Building configuration...
Current configuration : 887 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname pc
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
no ip routing
!
!
no ip cef
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address dhcp
 no ip route-cache
 duplex half
!
interface FastEthernet1/0
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end
 
 
2,router的配置
en
conf t
inter f0/0
ip add 1.1.1.1 255.255.255.0
no shut
ip helper-address 2.2.2.2             监听放F0/0上的udp广播,并转发到2.2.2.2上
inter f1/1
ip add 2.2.2.1 255.255.255.0
no shut
exit
router eigrp 1                                做EIGRP路由,否则路由表为空,两边无法连通
network 1.1.1.0
network 2.2.2.0
no auto-su                                    关闭路由汇总
 
以下是show run看到的
show run
Building configuration...
Current configuration : 981 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
ip dhcp excluded-address 1.1.1.1 1.1.1.100
!
!
!
!        
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 1.1.1.1 255.255.255.0
 ip helper-address 2.2.2.2
 duplex half
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!        
interface FastEthernet1/1
 ip address 2.2.2.1 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 1
 network 1.0.0.0
 network 2.0.0.0
 no auto-summary
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!        
!
line con 0
 exec-timeout 0 0
 logging synchronous
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end
 
3,DHCP上的配置
en
conf t
host dhcp
router eigrp 1
net 2.2.2.0
no auto
exit
inter f1/1
ip add 2.2.2.2 255.255.255.0
no shut
exit
 ip dhcp pool test              定义一个地址池叫test
network 1.1.1.0 /24             地址池的地址范围
domain-name test.com      属于test.com域
default-router 1.1.1.1         PC的网关是多少
dns-server 1.1.1.1              DNS服务器是哪儿
exit
ip dhcp excluded-address 1.1.1.1 1.1.1.20    指定不分配出去的IP地址
 
以下是show run看到的
dhcp#show run
Building configuration...
Current configuration : 1013 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname dhcp
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
ip cef
ip dhcp excluded-address 1.1.1.1 1.1.1.20
!
ip dhcp pool test
   network 1.1.1.0 255.255.255.0
   default-router 1.1.1.1
   dns-server 1.1.1.1
   domain-name test.com
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!        
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 2.2.2.2 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 1
 network 2.0.0.0
 no auto-summary
!
ip classless
no ip http server
!
!
!
!
!
!        
!
!
gatekeeper
 shutdown
!
!
line con 0
 transport preferred all
 transport output all
 stopbits 1
line aux 0
 transport preferred all
 transport output all
 stopbits 1
line vty 0 4
 login
 transport preferred all
 transport input all
 transport output all
!
!
end
 
 
验证结果
在PC上
pc#show ip inter f0/0
FastEthernet0/0 is up, line protocol is up
  Internet address is 1.1.1.21/24
  Broadcast address is 255.255.255.255
  Address determined by DHCP
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is not set
  Inbound  access list is not set
  Proxy ARP is enabled
  Local Proxy ARP is disabled
  Security level is default
  Split horizon is enabled
  ICMP redirects are always sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  IP fast switching is disabled
  IP fast switching on the same interface is disabled
  IP Flow switching is disabled
  IP CEF switching is disabled
  IP Null turbo vector
  IP Null turbo vector
  IP multicast fast switching is disabled
  IP multicast distributed fast switching is disabled
  IP route-cache flags are None
  Router Discovery is disabled
  IP output packet accounting is disabled
  IP access violation accounting is disabled
  TCP/IP header compression is disabled
  RTP/IP header compression is disabled
  Policy routing is disabled
  Network address translation is disabled
  WCCP Redirect outbound is disabled
  WCCP Redirect inbound is disabled
  WCCP Redirect exclude is disabled
  BGP Policy Mapping is disabled

实验完成,打完收功!![/img]..
申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。
 
Bacula,被誉为开源软件中最好的备份还原软件,它提供了企业级的客户机/服务器的备份解决方案,能够通过网络来管理文件的备份,恢复和核实工作。Bacula,既有windows版本的,也有Linux,Unix的。但目前有关于其使用的文章是在太少,而且介绍的很不详细,今天,我就来和大家一起探讨一下。(最新版本2.4.3主页 [url]http://www.bacula.org[/url])
一,bacula的模型
为了部署bacula,应该了解它的主要组件。
 

 
控制器是协调备份,恢复和校验操作的守护进程。用户可以通过控制台向控制守护进程提交任务。控制台不一定非要和控制守护进程在同一台机器上,可以分离。
存储守护进程是用来写入备份数据或者读取备份数据的。它必须安装在提供存储的机器上。也就是安装了磁带机或者要将备份存放的服务器上。它和控制守护进程可以分离,不一定要安装在一起。
文件守护进程安装在每台需要备份数据的系统上。比如,你想备份网络中的某台文件服务器上的数据,那么,你就应该将文件守护进程安装在此台服务器上。
编目是一个数据库,它保存所有备份的每个文件和卷的信息。所以,它需要数据库软件的支持,现在bacula支持mysql,postgresql和sqlite。
 
二,设置
试验环境如下:有两台linux主机,
一台主机名为RHEL5(以下简称server),ip为192.168.0.5,系统为RHEL 5.1,角色为备份服务器兼存储服务器(另挂一块磁盘到/tmp/test/下作为存储)
另一台主机名为client。Ip是192.168.0.6,系统是RHEL5.1,角色为需要备份的主机(这里我们以/boot为要备份还原的目录)
 
准备工作:在server上安装mysql和gcc环境(bacula编译需要gcc),并启动mysql
          在client上只需安装gcc环境
 
配置服务器server:
1, 解压编译安装bacula:

类别:Linux|阅读(3988)|回复(6)|(2)阅读全文>>
申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。
 
对于系统而言,我们可以有很多种办法去备份(还原)系统或文件,之所以要去做备份,就是为了在系统或文件遭到损害时,能及时恢复,把损失减小到最小。当然,对于企业服务器而言,备份的重要性是举足轻重。咱们今天就详细讨论一下LINUX中如何用dump和restore实现备份和还原。
 
一,dump的原理,优点及限制
dump和restore默认已经安装在RHEL5中,如果你使用的Linux中没有,可以自己去google中搜一下并下载安装。
使..
类别:Linux|阅读(3485)|回复(8)|(2)阅读全文>>
        申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。

            在LINUX中,周期执行的任务一般由cron这个守护进程来处理。cron读取一个或多个配置文件,这些配置文件中包含了命令行及其调用时间。cron的配置文件称为“crontab”,是“cron table”的简写。
一,cron在3个地方查找配置文件:
    1,/var/spool/cron/ 这个目录下存放的是每个用户包括root的cron..
类别:Linux|阅读(1959)|回复(2)|(0)阅读全文>>
申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。
         vi(vim)可以说是linux中用得最多的工具了,不管你配置服务也好,写脚本也好,总会用到它。但是,vim作为一个“纯字符”模式下的工具,它的操作和WINDOWS中的文本编辑工具相比多少有些复杂。这里,我根据自己个人的使用经验,整理了一套vim的操作以及记忆的方法,希望对大家的学习有所帮助。

 
VI的三种模式
   1,命令模式   2,输入模式 &nbs..
类别:Linux|阅读(1329)|回复(1)|(1)阅读全文>>
申明:本文为“老毛”原创,如需转载,请与作者联系。否则将视为侵权行为,作者将追究其法律责任。
一,         什么是IP地址
每个人都有自己的家庭住址,如果你居无定所,你的朋友要找你的时候肯定不方便。在网络中,真正能标识某台主机身份的实际上是MAC地址(又叫物理地址,它是固化在网卡上的,理论上是永远不会重复的),但MAC地址是以类似00-1E-4C-5E-19-8C的方式出现以及书写的,很显然不便于人们的记忆。所以,通常情况下,我们用类似于xx.xx.xx.xx的方式(例如:192.168.1.1)来..
          在RHEL5中,SELINUX可以用来加强系统的安全性,但如果设置不当,则会给你带来很多麻烦。
           所以一般情况下,很多RHCE习惯在X下去打开终端来操作,这样操作的好处是一旦SELINUX阻止掉某一操作,桌面的右上角会弹出一个黄色的五角星。单击这个五角星,会显示SELINUX阻止了哪些操作,并且提供解决的方法。你只需要将解决的代码复制到终端中去运行一下就OK。但千万注意,有时候它所提供的解决代码的路径不一定和你系..
类别:Linux|阅读(446)|回复(0)|(0)阅读全文>>
        下午课间的10分钟,有个老师做ftp出了点问题,可以用用户身份访问,但不能用匿名用户访问,提示如下:
         vsftpd: refusing to run with writable anonymous root
         从提示看肯定与权限有关,查看ftp的目录/var/ftp/pub权限,权限为777,好像没问题。检查配置文件/etc/vsftpd/vsftpd.conf,也没发现问题。难道是tcp_wrappers的问题?查看hosts.deny, hosts.allow为空。再看user_list和ftpu..
类别:Linux|阅读(650)|回复(1)|(0)阅读全文>>

    常规来说,root的权限是不可随意分割的,所以很难既给某个用户完成一件任务的权力,比如说备份,而又不给这个人自由运行系统的权力。如果把root给多个人去使用,显然是个不安全的做法。
    针对这个问题,现在广泛的采用SUDO的方式来解决。
    所谓的SUDO就是以普通用户的身份登录到系统,当需要完成某项任务时(假设此任务普通用户无权使用),在管理员root的授权下来完成。呵呵,对了,有点像WINDOWS中的委派。一旦用户得到授权后就可以去做原本自己不能做的事情..
类别:Linux|阅读(868)|回复(1)|(0)阅读全文>>
如何在REDHAT5.1下搭建自己的YUM
大家知道,REDHAT5.0后在X界面下使用“Add/Remove Software”是不能安装或者卸载软件包的,如果要使用要么去花钱注册,要么自己搭建一个本地的YUM源。
用过LINUX的人都知道,有时候安装程序包是一件非常痛苦的事,经常是要装A就要先装B,而装B前要先装C,装C前又要先安装A。碰到这种死循环会让你苦笑不得。但如果搭建一个YUM,就可以比较好的解决(至少系统光盘自带的包)各种包的依赖性关系。
本文就是探讨如何去搭建一个本地的YUM源。
一,准备工作
1,  启动REDHAT Linux ,并放入安装光盘..
类别:Linux|阅读(1692)|回复(5)|(1)阅读全文>>

公告

欢迎大家来老毛的窝做客!