Indice   FAQ  
Iscriviti  Login
Indice RouterOS RouterOS

ppoe si sconnette

Tutto su questo sistema operativo linux based - Configurazioni, dubbi, problematiche &....

ppoe si sconnette

Messaggioda FerBos » gio 22 ago 2019, 22:28

Ho veramente bisogno di un aiutino, non riesco a venire a capo, applicando questa configurazione,
del perchè la pppoe che creo inspiegabilmente si disconnette applicando man mano i vari passaggi.

In pratica quando applico la parte bridge, la connessione cade e nemmeno ricreandola ritorna up.

Senza avviare la parte di ether2 (backup) funziona regolarmente.

Codice: Seleziona tutto
/interface bridge
add name=bridge-LAN
add name=bridge-WAN

/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
    password=123456 use-peer-dns=yes user=pippo
   
/interface list
add name=LAN
add name=WAN

/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik

/interface bridge port
add bridge=bridge-WAN interface=ether1
add bridge=bridge-WAN interface=ether2
add bridge=bridge-LAN interface=ether3

/interface list member
add interface=bridge-LAN list=LAN
add interface=pppoe-out1 list=WAN
add interface=bridge-WAN list=WAN

/ip address
add address=123.123.123.123/24 interface=bridge-WAN network=123.123.123.0
add address=192.168.1.254/24 interface=bridge-WAN network=192.168.1.0
add address=192.168.2.254/24 interface=bridge-LAN network=192.168.2.0

/ip dhcp-client
add dhcp-options=hostname,clientid interface=ether1

/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
   
/ip firewall nat
add action=masquerade chain=srcnat out-interface=bridge-WAN

/ip route
add comment=DF1 distance=1 gateway=pppoe-out1
add comment=DF2 distance=2 gateway=192.168.1.1
add distance=1 dst-address=1.0.0.1/32 gateway=pppoe-out1
add distance=2 dst-address=1.1.1.1/32 gateway=192.168.1.1

/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes

/ip ssh
set forwarding-enabled=remote

/system clock
set time-zone-name=Europe/Rome

/system identity
set name="MikroTik"

/tool netwatch
add down-script="ip route set [find comment=DF1] distance=10" host=1.0.0.1 \
    timeout=5s up-script="ip route set [find comment=DF1] distance=1"
add down-script="ip route set [find comment=DF2] distance=20" host=1.1.1.1 \
    timeout=5s up-script="ip route set [find comment=DF2] distance=2"

FerBos
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 20
Iscritto il: mer 7 ago 2019, 13:46
Uso routerOS dalla Versione: v6.x

Re: ppoe si sconnette

Messaggioda ppraz » ven 23 ago 2019, 14:31

FerBos ha scritto:/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo


Qua crei la pppoe-client, e la abiliti sull'interfaccia "ether1", tutto ok

FerBos ha scritto:/interface bridge port
add bridge=bridge-WAN interface=ether1


Qua però prendi la ether1 e la metti nel bridge WAN, la ether1 a questo punto non supporta più la sessione pppoe, che dovresti invece attivare sull'interfaccia "WAN"

Il consiglio è di non abusare dei bridge se non strettamente necessari perché alla fine perdi traccia di quello che stai facendo
ppraz
Staff rosIT
Staff rosIT
 
Messaggi: 997
Iscritto il: sab 12 mar 2011, 14:13
Uso routerOS dalla Versione: v3.x

Re: ppoe si sconnette

Messaggioda FerBos » ven 23 ago 2019, 18:01

ppraz ha scritto:
FerBos ha scritto:/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo


Qua crei la pppoe-client, e la abiliti sull'interfaccia "ether1", tutto ok

FerBos ha scritto:/interface bridge port
add bridge=bridge-WAN interface=ether1


Qua però prendi la ether1 e la metti nel bridge WAN, la ether1 a questo punto non supporta più la sessione pppoe, che dovresti invece attivare sull'interfaccia "WAN"

Il consiglio è di non abusare dei bridge se non strettamente necessari perché alla fine perdi traccia di quello che stai facendo


scusami, ma sai che non capisco cosa intendi quando scrivi ..."che dovresti invece attivare sull'interfaccia WAN" ?
io ho queste tre interfacce attive:

/interface ethernet
set [ find default-name=ether1 ] name=ether1 speed=100Mbps (Eolo pppoe senza ip statico)
set [ find default-name=ether2 ] name=ether2 speed=100Mbps (Telecom con up statico)
set [ find default-name=ether3 ] name=ether3 speed=100Mbps (Lan ufficio)

e uso la 2 come backup.

Quardando un video sul sito ufficiale Mikrotik, ho visto che creavano due bridge distinti, uno Lan e uno Wan
e inserivano le ether nei bridge corretti.
Nel mio caso sia la ether1 che la 2 sono due "Wan", da lì il mio ragionamento.

Ho però riguardato meglio e ho trovato un passaggio dove creano una nat in più per la pppoe
senza però togliere la pppoe dal bridge-wan

/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1

cosa mi sfugge ancora ?

Grazie
FerBos
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 20
Iscritto il: mer 7 ago 2019, 13:46
Uso routerOS dalla Versione: v6.x

Re: ppoe si sconnette

Messaggioda ppraz » ven 23 ago 2019, 20:41

Non devi mettere nello stesso bridge le 2 wan, semmai crea WAN1 e WAN2
Poi se metti la ether1 dentro WAN1 allora non va bene che fai:
Codice: Seleziona tutto
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo

Ma devi fare
Codice: Seleziona tutto
/interface pppoe-client
add add-default-route=yes disabled=no interface=WAN1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo
ppraz
Staff rosIT
Staff rosIT
 
Messaggi: 997
Iscritto il: sab 12 mar 2011, 14:13
Uso routerOS dalla Versione: v3.x

Re: ppoe si sconnette

Messaggioda FerBos » sab 24 ago 2019, 12:19

ppraz ha scritto:Non devi mettere nello stesso bridge le 2 wan, semmai crea WAN1 e WAN2
Poi se metti la ether1 dentro WAN1 allora non va bene che fai:
Codice: Seleziona tutto
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo

Ma devi fare
Codice: Seleziona tutto
/interface pppoe-client
add add-default-route=yes disabled=no interface=WAN1 name=pppoe-out1 \
password=123456 use-peer-dns=yes user=pippo


ok ora capisco la logica, oggi pomeriggio procedo con le opportune modifiche.

Grazie mille per la spiegazione

aggiornerò il post con il risultato ottenuto.
FerBos
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 20
Iscritto il: mer 7 ago 2019, 13:46
Uso routerOS dalla Versione: v6.x

Re: ppoe si sconnette

Messaggioda FerBos » mar 27 ago 2019, 22:36

ho fatto alcune prove sabato e domenica e ho atteso un paio di giorni per avere un riscontro con il collegamento solo con pppoe, in pratica con la configurazione che posto, modificata, la ether1 pppoe va down dopo anche 20 minuti di navigazione continua e ritorna up quando interviene il controllo netwatch
ps in contemporanea cade anche la ether2 di backup
Ieri ho ripristinato la versione con la sola pppoe e nei log non ci sono segnalazioni di down
Non capisco perchè e non ne vengo a capo, :ave:
Codice: Seleziona tutto
/interface bridge
add name=bridge-LAN
add name=bridge-WAN1
add name=bridge-WAN2
/interface pppoe-client
add add-default-route=yes disabled=no interface=bridge-WAN1 name=pppoe-out1 \
    password=12345678 service-name=Eolo use-peer-dns=yes user=pippo
/interface list
add name=LAN
add name=WAN2
add name=WAN1
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge-WAN1 interface=ether1
add bridge=bridge-WAN2 interface=ether2
add bridge=bridge-LAN interface=ether3
/interface list member
add interface=bridge-LAN list=LAN
add interface=bridge-WAN1 list=WAN1
add interface=bridge-WAN2 list=WAN2
/ip address
add address=123.123.123.123/24 interface=bridge-WAN2 network=123.123.123.0
add address=192.168.1.254/24 interface=bridge-WAN2 network=192.168.1.0
add address=192.168.2.254/24 interface=bridge-LAN network=192.168.2.0
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall address-list
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN1" in-interface-list=!LAN1
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN1 not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN1
add action=drop chain=forward comment="defconf: drop all from WAN2 not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=bridge-WAN2
add action=masquerade chain=srcnat out-interface=pppoe-out1
/ip route
add comment=DF1 distance=1 gateway=pppoe-out1
add comment=DF2 distance=2 gateway=192.168.1.1
add distance=1 dst-address=1.1.1.1/32 gateway=pppoe-out1
add distance=2 dst-address=1.1.1.1/32 gateway=192.168.1.1
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip ssh
set forwarding-enabled=remote
/system clock
set time-zone-name=Europe/Rome
/system identity
set name="MikroTik"
/tool netwatch
add down-script="ip route set [find comment=DF1] distance=10;
add down-script="ip route set [find comment=DF2] distance=20;
FerBos
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 20
Iscritto il: mer 7 ago 2019, 13:46
Uso routerOS dalla Versione: v6.x

Re: ppoe si sconnette

Messaggioda FerBos » gio 29 ago 2019, 14:58

per l'errore citato sopra, di disconnessione, potrebbe essere dovuto ad un controllo cache ?

in un forum ho trovato un codice che riporto

Codice: Seleziona tutto
#| Now Configure DNS server so users can resolve hostnames,
#| Ex.cache-size=5000KiB
#| DNS Google = 8.8.8.8
#| DNS Cloudflare = 1.1.1.1
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000K max-udp-packet-size=512 servers=8.8.8.8
FerBos
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 20
Iscritto il: mer 7 ago 2019, 13:46
Uso routerOS dalla Versione: v6.x



Torna a RouterOS

Chi c’è in linea

Visitano il forum: Google [Bot] e 3 ospiti