Changes between Version 7 and Version 8 of Internal/OpenFlow/SandBoxSetup


Ignore:
Timestamp:
Jul 16, 2009, 4:42:50 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/SandBoxSetup

    v7 v8  
    4040Eth1 should be down because it compromises the routing table.   
    4141
    42 === Making Console VLAN aware(7/15) ===
    43 The console was connected to a trunk port for use as the controller for the OpenFlow switch, For this, it had to be VLAN aware. [[BR]]
    44 The site refrenced: http://ubuntuforums.org/showthread.php?t=703387
     42== Making the controller from the OpenFlow Reference System Code. (7/15) ==
     43The !OpenFlow reference system contains code for a controller that makes an !OpenFlow switch into a learning switch. This was built (but not installed) on the Console by following instructions on the !OpenFlow site: http://www.openflowswitch.org/wk/index.php/Ubuntu_Install
    4544
    46  
     45The console was then configured to be VLAN aware for VLANs 27,28, and 100. The site referenced: http://ubuntuforums.org/showthread.php?t=703387
     46
     47The interfaces, according to /etc/network/interfaces
     48{{{
     49# The primary network interface
     50auto eth0 eth1
     51iface eth0 inet dhcp
     52
     53iface eth1 inet static
     54address 192.168.100.28
     55netmask 255.255.255.0
     56#  address 10.19.0.10
     57#  netmask 255.255.0.0
     58
     59#auto eth1.27
     60iface eth1.27 inet static
     61address 10.19.0.10
     62netmask 255.255.0.0
     63
     64#auto eth1.28
     65iface eth1.28 inet static
     66address 192.168.1.28
     67netmask 255.255.255.0
     68
     69#auto eth1.100
     70iface eth1.100 inet static
     71address 172.16.100.1
     72netmask 255.255.255.0
     73}}}
     74
     75Eth1 was then connected to a reconfigured trunk port that allowed VLANs 27,28, and 100. The commands used for re-configuring trunk port 0/37:
     76
     77{{{
     78sw-sb09(config)# sh int gi 0/37
     79interface gigabitethernet 0/37
     80  switchport mode trunk
     81  switchport trunk allowed vlan 1,3,27-28
     82  switchport trunk native vlan 1
     83!
     84sw-sb09(config)# int gi 0/37           
     85sw-sb09(config-if)# no switchport trunk native vlan 1
     86!sw-sb09(config-if)# exit                 
     87!sw-sb09(config)# vlan 100
     88!sw-sb09(config-vlan)# exit
     89!sw-sb09(config)# interface vlan 100
     90!sw-sb09(config-if)# ip address 172.16.100.10 255.255.255.0
     91!sw-sb09(config-if)# interface gigabitethernet 0/37
     92!sw-sb09(config-if)# switchport trunk native vlan 100
     93!sw-sb09(config-if)# switchport trunk allowed vlan remove 1
     94!sw-sb09(config-if)# switchport trunk allowed vlan remove 3
     95!sw-sb09(config-if)# switchport trunk allowed vlan add 100
     96!sw-sb09(config-if)# save
     97}}}
     98
     99We later realized that VLAN interfaces for VLANs 27 and 28 also need to be assigned Ip addresses in order for the switch to be able to ping the controller's VLAN interfaces.
     100{{{
     101sw-sb09(config-if)# interface vlan 27
     102!sw-sb09(config-if)# ip address 10.19.0.20 255.255.0.0
     103!sw-sb09(config-if)# interface vlan 28
     104!sw-sb09(config-if)# ip address 192.168.1.20 255.255.255.0
     105!sw-sb09(config-if)# save
     106sw-sb09(config-if)# exit
     107sw-sb09(config)# exit
     108}}}
     109
     110pinging the interfaces...success.
     111{{{
     112sw-sb09# ping 10.19.0.10
     113PING 10.19.0.10 (10.19.0.10): 56 data bytes
     11464 bytes from 10.19.0.10: icmp_seq=0 ttl=64 time=2.095 ms
     11564 bytes from 10.19.0.10: icmp_s^C
     116----10.19.0.10 PING Statistics----
     1172 packets transmitted, 2 packets received, 0.0% packet loss
     118round-trip min/avg/max = 1.097/1.596/2.095 ms
     119sw-sb09# ping 192.168.1.28
     120PING 192.168.1.28 (192.168.1.28): 56 data bytes
     12164 bytes from 192.168.1.28: icmp_seq=0 ttl=64 time=2.100 ms
     12264 bytes from 192.168.1.28: icmp_seq=1 ttl=64 time=1.013 ms
     123^C
     124----192.168.1.28 PING Statistics----
     1252 packets transmitted, 2 packets received, 0.0% packet loss
     126round-trip min/avg/max = 1.013/1.556/2.100 ms
     127}}}
     128
     129=== establishing switch-controller connections ===
     130The code for the controller is found intuitively in the controller directory. Using `ptcp:[port]` as the connection method seems to work.
     131we also wanted an output and log of everything, so the full command was this (from the controller's directory) :
     132
     133./controller ptcp:6633 -v --log-file=test.log
     134
     135the first part of the output - you can see the OFPT_HELLO messages, negotiation of the !OpenFlow verison, the OFPT_FEATURES_REQUEST, and the switch's OFPT_FEATURES_REPLY:
     136{{{
     137Jul 16 12:25:43|00001|vlog|WARN|opened log file test.log
     138Jul 16 12:25:53|00002|rconn|DBG|tcp: entering ACTIVE
     139Jul 16 12:25:53|00003|vconn|DBG|tcp:172.16.100.10:58499: sent (Success): hello (xid=0xacec814):
     140
     141Jul 16 12:25:53|00004|vconn|DBG|tcp:172.16.100.10:58499: received: hello (xid=0x9a45bcaf):
     142
     143Jul 16 12:25:53|00005|vconn|DBG|tcp:172.16.100.10:58499: negotiated OpenFlow version 0x97 (we support versions 0x97 to 0x97 inclusive, peer no later than version 0x97)
     144Jul 16 12:25:53|00006|vconn|DBG|tcp:172.16.100.10:58499: sent (Success): features_request (xid=0x9eebe16b):
     145
     146Jul 16 12:25:53|00007|vconn|DBG|tcp:172.16.100.10:58499: sent (Success): set_config (xid=0xff52f51d): (sending flow expirations) miss_send_len=128
     147
     148Jul 16 12:25:53|00008|vconn|DBG|tcp:172.16.100.10:58499: received: features_reply (xid=0x9eebe16b): ver:0x97, dpid:12345678987
     149n_tables:2, n_buffers:256
     150features: capabilities:0x17, actions:0x3ff
     151 0(25): addr:00:12:e2:c8:1f:b5, config: 0, state:0x1
     152 1(26): addr:00:12:e2:c8:1f:b6, config: 0, state:0x1
     153 2(27): addr:00:12:e2:c8:1f:b7, config: 0, state:0x1
     154 3(28): addr:00:12:e2:c8:1f:b8, config: 0, state:0x1
     155 4(29): addr:00:12:e2:c8:1f:b9, config: 0, state:0x1
     156 5(30): addr:00:12:e2:c8:1f:ba, config: 0, state:0x1
     157 6(31): addr:00:12:e2:c8:1f:bb, config: 0, state:0x1
     158 7(32): addr:00:12:e2:c8:1f:bc, config: 0, state:0x1
     159 8(33): addr:00:12:e2:c8:1f:bd, config: 0, state:0x1
     160 9(34): addr:00:12:e2:c8:1f:be, config: 0, state:0x1
     161 10(35): addr:00:12:e2:c8:1f:bf, config: 0, state:0x1
     162 11(36): addr:00:12:e2:c8:1f:c0, config: 0, state:0x1
     163}}}
     164
     165   
    47166 
    48167
    49168
     169
     170[[BR]]
     171[[BR]]
     172[[BR]]
    50173[wiki:Documentation/OpenFlow/ go back to OpenFlow index]