---
# System prepended metadata

title: Ethernet Issues

---

# Ethernet Issues

## Plans ?

When can I say a certain ethernet adapter does not have a plan ? sometimes there are plans but it is not in the configuration file (netplan/ifcg-*). But if we run ```ip a``` its there. Also an ethernet can have a single configuration like **DHCP** , if so can we tell that particular ethernet has a plan based on this single configuration ?

## YAML Parsing

Boolean read is okay (when input is yes, it renders true) but when writing ( true is not outputted as yes, rather it stays true )

### Unmarshal 
Let's say I have a local struct xyz{DHCP bool}. Now if I unmarshal the following.
```
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4 : yes
```
I get xyz.DHCP = true

### Marshal
If I marshal the xyz to a yaml. I get something like this : 
```
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4 : true
```
But I needed ```dhcp4 : yes```

## Map within map initialization

Let's say I have the following code segment :
```go
type XYZMap map[string]*XYZ
```

When initializing I can do this : 
```go
xyzMap := make(map[string]*XYZ)
```

But If I have another map inside XYZ, Something like this : 
```go
XYZ{AnotherMap map[string]*[]string}
```
How to initialize map with in a map ?

## Manual Configuration 

If I create a bridge network with let's say interfaceX, then when I update interfaceX and assign some ips. It doesn't work. I have to remove the bridge network first then it works.

