Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
[root@n12 ~]# openstack server list
+--------------------------------------+-------------+--------+---------------------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+-------------+--------+---------------------------------------------+
| 08717da2-6d8f-4879-909a-e15da1834284 | test-server | ACTIVE | publicnet=172.19.1.35; othernet=192.168.0.5 |
+--------------------------------------+-------------+--------+---------------------------------------------+
[root@n12 ~]# openstack network list
+--------------------------------------+-----------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+-----------+--------------------------------------+
| 53f45b3f-02fb-4154-8093-78bead10c92d | othernet | ef2b6695-81de-4d9a-800c-f9a6be06d9b5 |
| 421a0004-b958-47a7-8dfe-ec94afaff1c8 | publicnet | e635c312-6bfe-4159-86b3-e340744ff502 |
+--------------------------------------+-----------+--------------------------------------+
[root@n12 ~]# openstack subnet list
+--------------------------------------+--------------+--------------------------------------+----------------+
| ID | Name | Network | Subnet |
+--------------------------------------+--------------+--------------------------------------+----------------+
| ef2b6695-81de-4d9a-800c-f9a6be06d9b5 | | 53f45b3f-02fb-4154-8093-78bead10c92d | 192.168.0.0/24 |
| e635c312-6bfe-4159-86b3-e340744ff502 | publicsubnet | 421a0004-b958-47a7-8dfe-ec94afaff1c8 | 172.19.0.0/22 |
+--------------------------------------+--------------+--------------------------------------+----------------+
[root@n12 ~]# openstack network show 421a0004-b958-47a7-8dfe-ec94afaff1c8
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2016-05-24T18:25:11 |
| description | |
| id | 421a0004-b958-47a7-8dfe-ec94afaff1c8 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| mtu | 1500 |
| name | publicnet |
| project_id | 19c48e677a7648b7b200b6523ca01b57 |
| provider:network_type | flat |
| provider:physical_network | physnet0 |
| provider:segmentation_id | None |
| router_external | Internal |
| shared | True |
| status | ACTIVE |
| subnets | e635c312-6bfe-4159-86b3-e340744ff502 |
| tags | [] |
| updated_at | 2016-05-24T18:25:11 |
+---------------------------+--------------------------------------+
[root@n12 ~]# openstack network show 53f45b3f-02fb-4154-8093-78bead10c92d
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2016-05-24T19:26:33 |
| description | |
| id | 53f45b3f-02fb-4154-8093-78bead10c92d |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| mtu | 1500 |
| name | othernet |
| project_id | 17fc0310618a42c3886911b8ebc58035 |
| provider:network_type | flat |
| provider:physical_network | physnet1 |
| provider:segmentation_id | None |
| router_external | Internal |
| shared | True |
| status | ACTIVE |
| subnets | ef2b6695-81de-4d9a-800c-f9a6be06d9b5 |
| tags | [] |
| updated_at | 2016-05-24T19:26:33 |
+---------------------------+--------------------------------------+
[root@n12 ~]# openstack subnet show e635c312-6bfe-4159-86b3-e340744ff502
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 172.19.1.32-172.19.1.38 |
| cidr | 172.19.0.0/22 |
| created_at | 2016-05-24T18:25:14 |
| description | |
| dns_nameservers | 172.19.0.12 |
| enable_dhcp | True |
| gateway_ip | 172.19.3.254 |
| host_routes | |
| id | e635c312-6bfe-4159-86b3-e340744ff502 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | publicsubnet |
| network_id | 421a0004-b958-47a7-8dfe-ec94afaff1c8 |
| project_id | 19c48e677a7648b7b200b6523ca01b57 |
| subnetpool_id | None |
| updated_at | 2016-05-24T18:25:14 |
+-------------------+--------------------------------------+
[root@n12 ~]# openstack subnet show ef2b6695-81de-4d9a-800c-f9a6be06d9b5
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 192.168.0.2-192.168.0.250 |
| cidr | 192.168.0.0/24 |
| created_at | 2016-05-24T19:28:37 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.0.1 |
| host_routes | |
| id | ef2b6695-81de-4d9a-800c-f9a6be06d9b5 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | |
| network_id | 53f45b3f-02fb-4154-8093-78bead10c92d |
| project_id | 17fc0310618a42c3886911b8ebc58035 |
| subnetpool_id | None |
| updated_at | 2016-05-24T19:28:37 |
+-------------------+--------------------------------------+
[root@n12 ~]# brctl show
bridge name bridge id STP enabled interfaces
brq421a0004-b9 8000.002299c58312 no eth0
tapc752ac56-b3
tapd61a7abe-c3
brq53f45b3f-02 8000.002299c58314 no eth1
tap1f44ca6f-06
tapc89e0348-4b
[root@test-server centos]# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.1.35 netmask 255.255.252.0 broadcast 172.19.3.255
inet6 fe80::f816:3eff:fec0:6b2b prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:c0:6b:2b txqueuelen 1000 (Ethernet)
RX packets 27275 bytes 1696621 (1.6 MiB)
RX errors 0 dropped 7 overruns 0 frame 0
TX packets 285 bytes 30464 (29.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether fa:16:3e:f7:f9:33 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 134 bytes 11552 (11.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134 bytes 11552 (11.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@test-server centos]# ls -al /sys/class/net
total 0
drwxr-xr-x. 2 root root 0 May 24 19:38 .
drwxr-xr-x. 43 root root 0 May 24 19:35 ..
lrwxrwxrwx. 1 root root 0 May 24 19:36 eth0 -> ../../devices/pci0000:00/0000:00:03.0/virtio0/net/eth0
lrwxrwxrwx. 1 root root 0 May 24 19:36 eth1 -> ../../devices/pci0000:00/0000:00:04.0/virtio1/net/eth1
lrwxrwxrwx. 1 root root 0 May 24 19:36 lo -> ../../devices/virtual/net/lo
[root@test-server centos]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="yes"
PEERDNS="yes"
IPV6INIT="no"
PERSISTENT_DHCLIENT="1"
{
"links": [
{
"ethernet_mac_address": "fa:16:3e:c0:6b:2b",
"id": "tapc752ac56-b3",
"mtu": null,
"type": "bridge",
"vif_id": "c752ac56-b376-4638-8ec3-12021dfda8aa"
},
{
"ethernet_mac_address": "fa:16:3e:f7:f9:33",
"id": "tapc89e0348-4b",
"mtu": null,
"type": "bridge",
"vif_id": "c89e0348-4b80-4dce-b18a-da1abdfa7927"
}
],
"networks": [
{
"id": "network0",
"link": "tapc752ac56-b3",
"network_id": "421a0004-b958-47a7-8dfe-ec94afaff1c8",
"type": "ipv4_dhcp"
},
{
"id": "network1",
"link": "tapc89e0348-4b",
"network_id": "53f45b3f-02fb-4154-8093-78bead10c92d",
"type": "ipv4_dhcp"
}
],
"services": [
{
"address": "172.19.0.12",
"type": "dns"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment