各系列BGP路由配置实例

Cisco router traditional bogons

This page aggregates all of the examples referenced on the Bogon Route Server Project (Bogons via BGP) page.Please see that page for full details of the Bogon Route Server Project,system requirements, caveats, etc.

 router bgp <your asn>
 neighbor x.x.x.x remote-as 65333
 neighbor x.x.x.x ebgp-multihop 255
 neighbor x.x.x.x description <your description>
 neighbor x.x.x.x prefix-list cymru-out out
 neighbor x.x.x.x route-map CYMRUBOGONS in
 neighbor x.x.x.x password <your password>
 neighbor x.x.x.x maximum-prefix 100 threshold 90
! You'll need to increase the maximum to at least 50000 with an
! appropriate thresholds if you're receiving one or both fullbogons
! feeds.
!
! Depending on IOS version, you may need to configure your router
! for new-style community syntax.
ip bgp-community new-format
!
! Set a bogon next-hop on all routers that receive the bogons.
ip route 192.0.2.1 255.255.255.255 null0
!
! Configure a community list to accept the bogon prefixes into the
! route-map.
ip community-list 10 permit 65333:888
!
! Configure the route-map.  Remember to apply it to the proper
! peering sessions.
route-map CYMRUBOGONS permit 10
 description Filter bogons learned from cymru.com bogon route-servers
 match community 10
 set ip next-hop 192.0.2.1
!
ip prefix-list cymru-out seq 5 deny 0.0.0.0/0 le 32

阅读剩余部分...

Linux安装配置samba

yum update
yum install -y samba samba-client samba-common cifs-utils

smb.conf的配置例子如下

 #cat  /etc/samba/smb.conf
 [global]
 workgroup = WORKGROUP
 server string = x200
 dns proxy = no
# interfaces = eth0
 syslog = 0
 browsable = yes
 map to guest = bad user
 nt pipe support = no
 encrypt passwords = true
 passdb backend = tdbsam
 obey pam restrictions = yes
 unix password sync = no
 netbios name = MY_SHARE_SERVER

#== Share Definitions ===
[share]  
path = /opt/share_folder
valid users=share_user
directory mask = 0755
create mask = 0664
writable = yes
guest ok = no
read only = no
public = no

配置好smb.conf后需要创建目录和设置用户密码

useradd share_user #创建Linux用户
mkdir /opt/share_folder #创建目录
chown -R share_user:share_user  /opt/share_folder #设置文件夹归属权限
chmod 755 /opt/share_folder    #设置文件夹读写权限
smbpasswd -a share_user #设置密码

最后启动smb后测试。

Linux挂载Samba

默认情况直接个mount -t cifs进行挂载,如使用mount.cifs的需要先安装cifs-utils

yum install cifs-utils -y
mount -t cifs -o username="Username",password="Password" //IP/share /mnt/
umount /mnt/

使用mount.cifs挂载

mount.cifs -o username="Username",password="Password" //IP/share /mnt/
umount.cifs /mnt/

加入fstab开机自动挂载需要将账号密码等参数写入一个文件

#cat /opt/pass.txt
username=YOURusername
password=YOURpassword  

然后写入fstab的格式大致如下的最后一行

cat /etc/fstab
/dev/sda1/                       ext4    defaults        1 1
/dev/sda2               swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
//IP/share    /mnt        cifs    credenials=/opt/pass.txt    0 0

  匿名登陆也是需要带username参数的,否则会报错。