Tag: networking

  • brctl

    brctl show

    [root@server70 etc]# brctl show
    bridge name     bridge id               STP enabled     interfaces
    br0             8000.002590d08d66       no              eth0
                                                            vnet0
    virbr0          8000.525400f12faf       yes             virbr0-nic
    [root@server70 etc]# ifconfig
    br0       Link encap:Ethernet  HWaddr 00:25:90:D0:8D:66
              inet addr:192.99.18.195  Bcast:192.99.18.255  Mask:255.255.255.0
              inet6 addr: fe80::225:90ff:fed0:8d66/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:8108397 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7823258 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1951542690 (1.8 GiB)  TX bytes:15136345174 (14.0 GiB)
    
    br0:1     Link encap:Ethernet  HWaddr 00:25:90:D0:8D:66
              inet addr:198.27.105.228  Bcast:198.27.105.228  Mask:255.255.255.255
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    
    eth0      Link encap:Ethernet  HWaddr 00:25:90:D0:8D:66
              inet6 addr: fe80::225:90ff:fed0:8d66/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:69612987 errors:6 dropped:0 overruns:0 frame:6
              TX packets:114006505 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:7042298846 (6.5 GiB)  TX bytes:151793078797 (141.3 GiB)
              Interrupt:48 Memory:fe9e0000-fea00000
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:407995 errors:0 dropped:0 overruns:0 frame:0
              TX packets:407995 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1284505268 (1.1 GiB)  TX bytes:1284505268 (1.1 GiB)
    
    virbr0    Link encap:Ethernet  HWaddr 52:54:00:F1:2F:AF
              inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    
    vnet0     Link encap:Ethernet  HWaddr FE:54:00:F6:41:4B
              inet6 addr: fe80::fc54:ff:fef6:414b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:44 errors:0 dropped:0 overruns:0 frame:0
              TX packets:24993 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500
              RX bytes:3499 (3.4 KiB)  TX bytes:2333834 (2.2 MiB)
    
    [root@server70 etc]#
    

    brctl showmacs br0

    [root@server70 etc]#  brctl showmacs br0
    port no mac addr                is local?       ageing timer
      1     00:05:73:a0:00:00       no                11.10
      1     00:07:b4:00:00:02       no                 2.72
      1     00:07:b4:00:01:01       no                 4.73
      1     00:07:b4:00:01:02       no                 6.65
      1     00:25:90:7b:a3:8e       no                31.80
      1     00:25:90:7c:72:34       no                53.08
      1     00:25:90:d0:8d:66       yes                0.00
      1     00:2a:6a:3d:50:81       no               119.90
      1     00:2a:6a:3d:df:bc       no                 2.33
      1     c8:f9:f9:58:3f:c0       no                 0.00
      1     d8:24:bd:91:c7:00       no                 0.00
      2     fe:54:00:f6:41:4b       yes                0.00
    [root@server70 etc]#
    

    brctl showstp br0

    [root@server70 etc]# brctl showstp br0
    br0
     bridge id              8000.002590d08d66
     designated root        8000.002590d08d66
     root port                 0                    path cost                  0
     max age                  19.99                 bridge max age            19.99
     hello time                1.99                 bridge hello time          1.99
     forward delay            14.99                 bridge forward delay      14.99
     ageing time             299.95
     hello timer               0.42                 tcn timer                  0.00
     topology change timer     0.00                 gc timer                   8.42
     hash elasticity           4                    hash max                 512
     mc last member count      2                    mc init query count        2
     mc router                 1                    mc snooping                1
     mc last member timer      0.99                 mc membership timer      259.96
     mc querier timer        254.96                 mc query interval        124.98
     mc response interval      9.99                 mc init query interval    31.24
     flags
    
    
    eth0 (0)
     port id                0000                    state                forwarding
     designated root        8000.002590d08d66       path cost                  4
     designated bridge      8000.002590d08d66       message age timer          0.00
     designated port        8001                    forward delay timer        0.00
     designated cost           0                    hold timer                 0.00
     mc router                 1
     flags
    
    vnet0 (0)
     port id                0000                    state                forwarding
     designated root        8000.002590d08d66       path cost                100
     designated bridge      8000.002590d08d66       message age timer          0.00
     designated port        8002                    forward delay timer        0.00
     designated cost           0                    hold timer                 0.00
     mc router                 1
     flags
    
    [root@server70 etc]#
    
  • Adding IP Range in CentOS 6

    To add an IP range in CentOS 6 server, create file

    vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0
    

    Add

    IPADDR_START=67.198.150.171
    IPADDR_END=67.198.150.174
    CLONENUM_START=0
    

    Replace IP with your actual start and end IP.

    Restart network service with

    service network restart