mininet + mnec +bgpd

 

root@ubuntu:/home/ubuntu# ps -elf | grep r3
0 S root     22962 22933  0  80   0 -  1367 select 19:41 pts/10   00:00:00 bash --norc -mis mininet:mgntr3
4 S root     22970 22933  0  80   0 -  1367 select 19:41 pts/14   00:00:00 bash --norc -mis mininet:r3
1 S quagga   23897     1  0  80   0 -  1251 select 19:41 ?        00:00:00 zebra -d -f /etc/quagga/sdn-ip-topology/configs/zebra.conf -z /var/run/quagga/zebrar3.api -i /var/run/quagga/zebrar3.pid
1 S quagga   23899     1  0  80   0 -  1962 select 19:41 ?        00:00:00 bgpd -d -f /etc/quagga/sdn-ip-topology/configs/quagga3.conf -z /var/run/quagga/zebrar3.api -i /var/run/quagga/bgpdr3.pid

mininet  + mnec +bgpd

 

 

 

def main():
    os.system("mnexec -a %s %s" % (22970, telnet localhost bgpd))


if __name__ == __main__:
    main()
"run.py" 63L, 1630C written     
root@ubuntu:/home/ubuntu/# python run.py 
/proc/22970/ns/net: No such file or directory
root@ubuntu:/home/ubuntu/# ps -elf | grep r3
0 S root     25935 25906  0  80   0 -  1367 select 19:48 pts/10   00:00:00 bash --norc -mis mininet:mgntr3
4 S root     25943 25906  0  80   0 -  1367 select 19:48 pts/14   00:00:00 bash --norc -mis mininet:r3
1 S quagga   26860     1  0  80   0 -  1251 select 19:48 ?        00:00:00 zebra -d -f /etc/quagga/sdn-ip-topology/configs/zebra.conf -z /var/run/quagga/zebrar3.api -i /var/run/quagga/zebrar3.pid
1 S quagga   26862     1  0  80   0 -  1962 select 19:48 ?        00:00:00 bgpd -d -f /etc/quagga/sdn-ip-topology/configs/quagga3.conf -z /var/run/quagga/zebrar3.api -i /var/run/quagga/bgpdr3.pid
0 S root     27442 24481  0  80   0 -  1097 pipe_w 19:48 pts/25   00:00:00 grep --color=auto r3
root@ubuntu:/home/ubuntu/# 
python run.py 
Trying ::1...
Connected to localhost.
Escape character is ^].

Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

Password: 
r3> en
r3# show run

Current configuration:
!
hostname r3
password sdnip
log stdout
!
router bgp 65003
 bgp router-id 10.0.3.1
 network 192.168.3.0/24
 timers bgp 3 9
 neighbor 10.0.3.101 remote-as 65000
 neighbor 10.0.3.101 ebgp-multihop 255
 neighbor 10.0.3.101 advertisement-interval 5
 neighbor 10.0.3.101 timers connect 5
!
 address-family ipv6
 exit-address-family
 exit
!
line vty
!
end
r3# 
r3# 
def main():
    os.system("mnexec -a %s %s" % (25943, ‘telnet localhost 2605‘))


if __name__ == __main__:
    main()
"run.py" 63L, 1630C written     
root@ubuntu:/home/ubuntu/jvimal-bgp-789055b95a66# python run.py 
Trying ::1...
Connected to localhost.
Escape character is ^].

Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

Password: 
r3> en
r3# show run

Current configuration:
!
hostname r3
password sdnip
log stdout
!
router bgp 65003
 bgp router-id 10.0.3.1
 network 192.168.3.0/24
 timers bgp 3 9
 neighbor 10.0.3.101 remote-as 65000
 neighbor 10.0.3.101 ebgp-multihop 255
 neighbor 10.0.3.101 advertisement-interval 5
 neighbor 10.0.3.101 timers connect 5
!
 address-family ipv6
 exit-address-family
 exit
!
line vty
!
end
r3# 
r3# 

 

 

def main():
    os.system("mnexec -a %s %s" % (25943, telnet localhost 2604))


if __name__ == __main__:
    main()
"run.py" 63L, 1630C written
root@ubuntu:/home/ubuntu/jvimal-bgp-789055b95a66# python run.py 
Trying ::1...
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
root@ubuntu:/home/ubuntu/jvimal-bgp-789055b95a66# vi run.py 
    if pid is None:
        print "node `%s‘ not found" % (FLAGS.node)
        sys.exit(1)

    cmd =  .join(FLAGS.cmd)
    os.system("mnexec -a %s %s" % (pid, cmd))
‘‘‘
def main():
    os.system("mnexec -a %s %s" % (25943, telnet localhost 2601))


if __name__ == __main__:
    main()
"run.py" 63L, 1630C written
root@ubuntu:/home/ubuntu/jvimal-bgp-789055b95a66# python run.py 
Trying ::1...
Connected to localhost.
Escape character is ^].

Hello, this is Quagga (version 1.2.4).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

Password: 
zebra> en
zebra# show run

Current configuration:
!
hostname zebra
password sdnip
log stdout
!
interface lo
!
interface r3-eth0
!
interface r3-eth1
!
 --More-- 

 

mininet + mnec +bgpd

上一篇:php isset 函数


下一篇:centos7 安装Flume