Networking

Page last edited hace 2117 días 3 horas
De Solaris-ES
Saltar a: navegación, buscar
  • Listar los links disponibles:
root@galdos12:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         100    full      nge0
  • Determinar el estado de una conexion
root@galdos12:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
oracle/net0         vnic      1500   up       net0
web/net0            vnic      1500   up       net0
  • Servicios de red:
root@galdos12:~# svcs network/physical
STATE          STIME    FMRI
disabled       10:51:23 svc:/network/physical:nwam
online         10:51:33 svc:/network/physical:upgrade
online         10:51:47 svc:/network/physical:default
  • Creacion de un switch virtual
root@galdos12:~# dladm create-etherstub sw1
  • Creacion de un interfaz virtual sobre el interfaz fisico:
root@galdos12:~# dladm create-vnic -l net0 vnicj0
  • Creacion de un interfaz virtual sobre el switch:
root@galdos12:~# dladm create-vnic -l sw1  vnicj1

root@galdos12:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
oracle/net0         vnic      1500   up       net0
web/net0            vnic      1500   up       net0
sw1                 etherstub 9000   unknown  --
vnicj0              vnic      1500   up       net0
vnicj1              vnic      9000   unknown  sw1


  • Listar interfaces con "plumb":
root@galdos12:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --
  • Activar una interfaz (hacer un "plumb"):
root@galdos12:~# ipadm create-ip vnicj0
root@galdos12:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --
vnicj0     ip       down     no     --
  • Configurar una ip en una interfaz:
root@galdos12:~# ipadm create-addr -T static -a 10.164.5.17/24 vnicj0/addr1
root@galdos12:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/_b           dhcp     ok           10.164.5.12/24
vnicj0/addr1      static   ok           10.164.5.17/24
lo0/v6            static   ok           ::1/128
net0/_a           addrconf ok           fe80::2e0:81ff:fe5f:2c3c/10
  • Bajar una interfaz de red:
root@galdos12:~# ipadm down-addr vnicj0/addr1
root@galdos12:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/_b           dhcp     ok           10.164.5.12/24
vnicj0/addr1      static   down         10.164.5.17/24
lo0/v6            static   ok           ::1/128
net0/_a           addrconf ok           fe80::2e0:81ff:fe5f:2c3c/10
  • Leventar una interfaz
root@galdos12:~# ipadm up-addr vnicj0/addr1
root@galdos12:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/_b           dhcp     ok           10.164.5.12/24
vnicj0/addr1      static   ok           10.164.5.17/24
lo0/v6            static   ok           ::1/128
net0/_a           addrconf ok           fe80::2e0:81ff:fe5f:2c3c/10


  • Cambiar la configuracion fisica de una interfaz
root@galdos12:~# dladm show-linkprop vnicj1
LINK     PROPERTY        PERM VALUE          DEFAULT        POSSIBLE
vnicj1   autopush        rw   --             --             -- 
vnicj1   zone            rw   --             --             -- 
vnicj1   state           r-   unknown        up             up,down 
vnicj1   mtu             rw   9000           1500           576-9000 
vnicj1   maxbw           rw      10          --             -- 
vnicj1   cpus            rw   --             --             -- 
vnicj1   cpus-effective  r-   0              --             -- 
vnicj1   rxfanout        rw   --             1              -- 
vnicj1   rxfanout-effective r- 1             --             -- 
vnicj1   pool            rw   --             --             -- 
vnicj1   pool-effective  r-   --             --             -- 
vnicj1   priority        rw   high           high           low,medium,high 
vnicj1   tagmode         rw   vlanonly       vlanonly       normal,vlanonly 
vnicj1   protection      rw   --             --             mac-nospoof,
                                                            restricted,
                                                            ip-nospoof,
                                                            dhcp-nospoof 
vnicj1   mac-address     rw   2:8:20:4e:68:fa 2:8:20:4e:68:fa -- 
vnicj1   allowed-ips     rw   --             --             -- 
vnicj1   allowed-dhcp-cids rw --             --             -- 
vnicj1   rxrings         rw   --             --             -- 
vnicj1   rxrings-effective r- --             --             -- 
vnicj1   txrings         rw   --             --             -- 
vnicj1   txrings-effective r- --             --             -- 
vnicj1   txrings-available r- 0              --             -- 
vnicj1   rxrings-available r- 0              --             -- 
vnicj1   rxhwclnt-available r- 0             --             -- 
vnicj1   txhwclnt-available r- 0             --             -- 
root@galdos12:~# dladm set-linkprop -p maxbw=10m vnicj1


  • Controlar el flujo de red a nivel de protocolos o puertos:
root@galdos12:~# flowadm 
usage: flowadm <subcommand> <args>...
    add-flow       [-t] [-R <root-dir>] -l <link> -a <attr>=<value>[,...]
                   [-p <prop>=<value>,...] <flow>
    remove-flow    [-t] [-R <root-dir>] {-l <link> | <flow>}
    show-flow      [-P] [[-p] -o <field>,...] [-l <link>] [<flow>]

    set-flowprop   [-t] [-R <root-dir>] -p <prop>=<value>[,...] <flow>
    reset-flowprop [-t] [-R <root-dir>] [-p <prop>,...] <flow>
    show-flowprop  [-P] [[-c] -o <field>,...] [-l <link>] [-p <prop>,...]
                   [<flow>]
# flowadm add-flow -l net0 -a transport=UDP -p maxbw=100M, limit-udp-1
# flowadm show-flow
       FLOW        LINK        IPADDR            PROTO  LPORT   RPORT   DSFLD
       tcpflow     e1000g2     --                tcp    --      --      --
       zone1/tcpflow e1000g1   --                tcp    --      --      --