Which sentence is punctuated correctly?

O A large dog such as a Great Dane can live ten years or more

A large dog, such as a Great Dane can live ten years or more

A large dog, such as a Great Dane, can live ten years or more

O A large dog such as a Great Dane, can live ten years or more