Przekopałem z pół internetu, na drugie pół już nie bardzo mam siły stąd prośba o pomoc.
Rzecz się dzieje na na 22.04
Case jest raczej prosty, na ubuntu na KVM chcę postawić virtualkę z siecią bridge - IP na virtualce ma być najlepiej pobierany z DHCP.
Konfiguracja sieci na hoście:
Kod: Zaznacz cały
cat /etc/netplan/netplan.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
ens224:
dhcp4: no
bridges:
br1:
interfaces:
- ens224
dhcp4: no
addresses:
- 10.0.1.14/24
routes:
- to: default
via: 10.0.1.1
nameservers:
addresses: [10.0.1.1, 8.8.8.8]
parameters:
stp: false
forward-delay: 0
###PLEASE MAKE SURE TO CHANGE THE FILENAME TO "*.yaml" and perform 'netplan apply' command###
Kod: Zaznacz cały
cat /usr/lib/systemd/network/99-default.link
MACAddressPolicy=none
Kod: Zaznacz cały
cat /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
Kod: Zaznacz cały
brctl show
bridge name bridge id STP enabled interfaces
br1 8000.005056b4a5b9 no ens224
Ustawienia switcha
Kod: Zaznacz cały
virsh net-info bridged-network
Name: bridged-network
UUID: e5e0259a-e2b9-4b3b-af1c-15717b68ce46
Active: yes
Persistent: yes
Autostart: yes
Bridge: br1
Kod: Zaznacz cały
<interface type='network'>
<mac address='52:54:00:66:14:4c'/>
<source network='bridged-network'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>
Kod: Zaznacz cały
brctl show
bridge name bridge id STP enabled interfaces
br1 8000.005056b4a5b9 no ens224
vnet3
virbr0 8000.52540059efd1 yes
Wydaje mi się, że na hoście mam jakiś problem z konfiguracją bridge, że host z jakiegoś powodu nie forwarduje ruchu, tylko go zbija.
tcpdump wykonany na interface fizycznym hosta pokazuje ruch....
Kod: Zaznacz cały
tcpdump ether host 52:54:00:66:14:4c -vvv -i ens224
tcpdump: listening on ens224, link-type EN10MB (Ethernet), snapshot length 262144 bytes
19:13:49.305851 IP6 (flowlabel 0x53459, hlim 255, next-header ICMPv6 (58) payload length: 8) fe80::f6e0:5690:5cba:cb15 > ip6-allrouters: [icmp6 sum ok] ICMP6, router solicitation, length 8
19:13:51.524033 IP (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 319)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 52:54:00:66:14:4c (oui Unknown), length 291, xid 0xb7080d6, secs 15, Flags [none] (0x0000)
Client-Ethernet-Address 52:54:00:66:14:4c (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Discover
Client-ID (61), length 7: ether 52:54:00:66:14:4c
Parameter-Request (55), length 17:
Subnet-Mask (1), Time-Zone (2), Domain-Name-Server (6), Hostname (12)
Domain-Name (15), MTU (26), BR (28), Classless-Static-Route (121)
Default-Gateway (3), Static-Route (33), YD (40), YS (41)
NTP (42), Unknown (119), Classless-Static-Route-Microsoft (249), Unknown (252)
RP (17)
MSZ (57), length 2: 576
Hostname (12), length 13: "homeassistant"
END (255), length 0
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel